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

'Mouse' (A Nil Value)!?

How can I got my mouse in a script in the workspace if we can ?

1 comment

1

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

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.