I'm making a script that would make something appear on top of a brick when a mouse hovers over it, and disappear when the mouse stops.
However I am having problems with this
Here is my script:
script.Parent.Head.ClickDetector.MouseHoverLeave:connect(function(playerwhoclicked)
if script.Parent:FindFirstChild(part.Object.Value) then
wait(1)
local ghostobjecty=script.Parent:FindFirstChild(part.Object.Value)
ghostobjecty:Remove()
end
end)
This is what removes it However for some reason this script is triggered right after the MouseHoverEnter script, and I can't understand why it's not working. Please help.

3 comments
The tabbing looks horrid, sorry'bout that
Im using the parameters for things outside of the script
They wont work outside of the scope of the event.