Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Why isn't this working? (Short script)

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

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

This discussion is preserved as it was. New answers, comments, and votes are closed.