Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why isn't this working? (Short script)

Asked by 10 years ago

Please make your question title relevant to your question content. It should be a one-sentence summary in question form.

wait()

script.Parent.ClickDetector.MouseHoverEnter:connect(function(pl) local clickgo = game.Lighting:findFirstChild("ClickGo"):clone() clickgo.Parent = pl.PlayerGui script.Parent.BrickColor = BrickColor.new("Mid gray")

end)

script.Parent.ClickDetector.MouseHoverLeave:connect(function(pl) local clickgo1 = game.pl.PlayerGui:findFirstChild("ClickGo"):remove()

script.Parent.BrickColor = BrickColor.new("Medium stone grey")

end)

( The output says " Disconnected event because of exception " )

1 answer

Log in to vote
0
Answered by 10 years ago

You should have put this in a code block to make it easier to answer.

wait()

script.Parent.ClickDetector.MouseHoverEnter:connect(function(pl) 
    local clickgo = game.Lighting:findFirstChild("ClickGo"):clone() 
    clickgo.Parent = pl:WaitForChild("PlayerGui")
    script.Parent.BrickColor = BrickColor.new("Mid gray")
end)

script.Parent.ClickDetector.MouseHoverLeave:connect(function(pl)
game.pl:WaitForChild("PlayerGui"):findFirstChild("ClickGo"):remove()
script.Parent.BrickColor = BrickColor.new("Medium stone grey")
end)

not sure if that will work but you could try

Ad

Answer this question