I'm not sure How I would use Mouse for example, DO I do
LocalPlayer.Mouse.Move:connect(function)--[[?]]
or do I just use
Mouse.connect(function)--[[?]]
and also, do I use it in a scrip or localscript?
I'm not sure How I would use Mouse for example, DO I do
LocalPlayer.Mouse.Move:connect(function)--[[?]]
or do I just use
Mouse.connect(function)--[[?]]
and also, do I use it in a scrip or localscript?
To get the mouse, you must do game.Players.LocalPlayer:GetMouse() from a local script. To use an anonymous function for the Move event, you do this:
local mouse = game.Players.LocalPlayer:GetMouse()
mouse.Move:connect(function()
--code
end)
Also, make sure the LocalScript is in PlayerGui or Backpack.
Woah why the heck was this downvoted?!
I would do this in a local script:
mouse = game.Players.localPlayer:GetMouse()
mouse.Moved:connect(function()
print("Mouse moved")
--Do what you want here.
end
to get the mouse.
This discussion is preserved as it was. New answers, comments, and votes are closed.
1 comment
Thanks