How can I got my mouse in a script in the workspace if we can ?
COMMUNITY QUESTION
'Mouse' (A Nil Value)!?
1 answer
In a script, to define a variable for a Player's Mouse, simple use GetMouse. Must be a LocalScript
local Player = Game.Players.LocalPlayer
local Mouse = Player:GetMouse()
Mouse.Button1Down:connect(function()
print("Button 1 is down")
end)
1 comment
0
I alreally know this but I want know if we can do it in a server script and in the worksapce not in a local script !
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
You really shouldn't manipulate the mouse in a server script, since your mouse it local to you.