of     2   
chevron_rightchevron_rightchevron_right

brandon2277
#35087991Friday, October 08, 2010 3:29 PM GMT

script.Parent.ClickDetector.MouseClick:connect(function() local gui = Instance.new("ScreenGui") local msg = Instance.new("TextBox") msg.Size = UDim2.new(1, 200, 1, 200) msg.Position = UDim2.new(50, 50, 50, 50) gui.Parent = game.Players.LocalPlayer.PlayerGui msg.Parent = gui msg.Text = "*Knock*" wait(2) msg.Text = "*Knock* *Knock*" wait(2) msg.Text = "*Knock* *Knock* *Knock*" wait(3) gui:remove() end) door = script.Parent function clickit() door.Transparency = 1 door.CanCollide = false wait(15) door.Transparency = 0 door.CanCollide = true end door.ClickDetector.MouseClick:connect(clickit) . . . . . . (the dots arnt in it) the gui wont show... why????
brandon2277
#35088126Friday, October 08, 2010 3:35 PM GMT

omg no good scripters are online
pighead10
#35088242Friday, October 08, 2010 3:40 PM GMT

"omg no good scripters are online" *ehem* Post your output first...
brandon2277
#35088327Friday, October 08, 2010 3:43 PM GMT

srry but no one was posting...any ways whats wrong?
kirkyturky12
#35088335Friday, October 08, 2010 3:44 PM GMT

num = 1 door = script.Parent script.Parent.ClickDetector.MouseClick:connect(function() if num == 1 then local gui = Instance.new("ScreenGui") local msg = Instance.new("TextBox") msg.Size = UDim2.new(1, 200, 1, 200) gui.Parent = game.Players.LocalPlayer.PlayerGui msg.Parent = gui msg.Text = "*Knock*" wait(2) msg.Text = "*Knock* *Knock*" wait(2) msg.Text = "*Knock* *Knock* *Knock*" wait(3) gui:remove() num = 2 elseif num == 2 then door.Transparency = 1 door.CanCollide = false wait(15) door.Transparency = 0 door.CanCollide = true num = 1 end end)
pighead10
#35088358Friday, October 08, 2010 3:44 PM GMT

output?
brandon2277
#35088580Friday, October 08, 2010 3:56 PM GMT

wait is the guy above you right?
kirkyturky12
#35088610Friday, October 08, 2010 3:57 PM GMT

Yes! -_- Im a good scripter also.
pighead10
#35088616Friday, October 08, 2010 3:58 PM GMT

It would probably work, but when you clicked it it would put the GUI up, then you'd have to click it again to get the door to work.
brandon2277
#35088638Friday, October 08, 2010 3:59 PM GMT

so how would i make it so it would be 1 click?
kirkyturky12
#35088641Friday, October 08, 2010 3:59 PM GMT

My script makes it so when you click the brick the message pops up then it goes away and when you click the brick again it opens.
kirkyturky12
#35088675Friday, October 08, 2010 4:00 PM GMT

door = script.Parent script.Parent.ClickDetector.MouseClick:connect(function() local gui = Instance.new("ScreenGui") local msg = Instance.new("TextBox") msg.Size = UDim2.new(1, 200, 1, 200) gui.Parent = game.Players.LocalPlayer.PlayerGui msg.Parent = gui msg.Text = "*Knock*" wait(2) msg.Text = "*Knock* *Knock*" wait(2) msg.Text = "*Knock* *Knock* *Knock*" wait(3) gui:remove() num = 2 door.Transparency = 1 door.CanCollide = false wait(15) door.Transparency = 0 door.CanCollide = true num = 1 end)
pighead10
#35088732Friday, October 08, 2010 4:04 PM GMT

I think this would work, although I've only edited kirky's :/ door = script.Parent script.Parent.ClickDetector.MouseClick:connect(function() local rungui = coroutine.create(function() local gui = Instance.new("ScreenGui") local msg = Instance.new("TextBox") msg.Size = UDim2.new(1, 200, 1, 200) gui.Parent = game.Players.LocalPlayer.PlayerGui msg.Parent = gui msg.Text = "*Knock*" wait(2) msg.Text = "*Knock* *Knock*" wait(2) msg.Text = "*Knock* *Knock* *Knock*" wait(3) gui:remove() end) coroutine.resume(rungui) door.Transparency = 1 door.CanCollide = false wait(15) door.Transparency = 0 door.CanCollide = true end)
pighead10
#35088745Friday, October 08, 2010 4:05 PM GMT

@kirky You forgot to remove all the num variables from the script, so it would error, and it would still complete one before the other. Mine would work, unless yours had a syntax error...
kirkyturky12
#35088862Friday, October 08, 2010 4:12 PM GMT

Also brandon you made it a text box... Make it a textbutton.
kirkyturky12
#35088927Friday, October 08, 2010 4:15 PM GMT

cd = script.Parent.ClickDetector door = script.Parent script.Parent.ClickDetector.MouseClick:connect(function() cd.Parent = nil local gui = Instance.new("ScreenGui") local msg = Instance.new("TextButton") msg.Size = UDim2.new(1, 200, 1, 200) gui.Parent = game.Players.LocalPlayer.PlayerGui msg.Parent = gui msg.Text = "*Knock*" wait(2) msg.Text = "*Knock* *Knock*" wait(2) msg.Text = "*Knock* *Knock* *Knock*" wait(3) gui:remove() door.Transparency = 1 door.CanCollide = false wait(15) door.Transparency = 0 door.CanCollide = true cd.Parent =script.Parent end)
brandon2277
#35089286Friday, October 08, 2010 4:34 PM GMT

nither of em worked
kirkyturky12
#35089349Friday, October 08, 2010 4:36 PM GMT

I tested and it works! Did you even put in a click detector!
brandon2277
#35089427Friday, October 08, 2010 4:39 PM GMT

yes i put in a click decetor show me the place you put it in
zeke505
#35089484Friday, October 08, 2010 4:41 PM GMT

You can't access LocalPlayer without a LocalScript. LocalScripts only run as a descendant of a player.
brandon2277
#35089537Friday, October 08, 2010 4:43 PM GMT

so i need to make a local script? can some one help me with one of them? XD zeke?
zeke505
#35089560Friday, October 08, 2010 4:44 PM GMT

Yes, it needs to be a localscript INSIDE THE PLAYER for it to work.
brandon2277
#35089601Friday, October 08, 2010 4:46 PM GMT

so how do i do that?
zeke505
#35089608Friday, October 08, 2010 4:47 PM GMT

... -.-
brandon2277
#35089647Friday, October 08, 2010 4:49 PM GMT

wait i might have it...

    of     2   
chevron_rightchevron_rightchevron_right