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

My mouseEnter and mouseLeave isn't working?

I'm trying to get messages to pop that follow your mouse when you hover over a part. However the script only works in studio but in actual game. I have tried both local script and script.

function mouseEnter(player)
    print("enter")
    local mouse = player:GetMouse()
    player.PlayerGui.Messages.Messages["Remote1"].Position = UDim2.new(0, mouse.X, -.1, mouse.Y)

end

function mouseLeave(player)
    print("left")
    player.PlayerGui.Messages.Messages["Remote1"].Position = UDim2.new(1, 0, 1, 0)
end

script.Parent.ClickDetector.MouseHoverEnter:connect(mouseEnter)
script.Parent.ClickDetector.MouseHoverLeave:connect(mouseLeave)

1 answer

When something in Roblox studios works but not in the game is it because the Client and the Server are the same thing in Roblox studio ,but not in game.Learn about remote events and functions to fix it

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