I heard about this command like 20 or 30 times. I seen this command in a post that says " I am making a FPS game. I want to remove the backpack beacause I want to make weapons that aren't tools, using GetMouse() instead of tool". So I got confused In that Part. So GetMouse() means that a tool inside the player? If not please tell me what does it mean. Thank you for reading/helping. :)
✓ ANSWER ACCEPTED
What does GetMouse() means?
2 answers
✓ Accepted answer
Hello there! GetMouse is a really simple thing where you can replace instances for another.
local Player = Game.Players.LocalPlayer
local Mouse = Player:GetMouse()
Mouse.Button1Down:connect(function()
print("Button 1 is down")
end)
The example above is a simple script to demonstrate what GetMouse is. The script is showing; whenever the LocalPlayer left clicks, and instance will be replaced. Like, if you want the LocalPlayer to left click for a gun, instead of having it in the backpack, he would have it in the script for whenever he clicks that certain key you script. In this case, the script is left click.
-Auroradom
:GetMouse() is like connecting the mouse to the game as far as I know, it can be used like this
wait(1)
player = game.Players.LocalPlayer
Mouse = player:GetMouse()
Mouse.Button2Down:connect(function()
-- put the rest of code here.
end)
you can also use the Keydown to track when a key is pressed.
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
So if I want to add a gun how would I do that?
Well, you'd have to use the command bar to insert the model into the script. So, it could be like; roblox.11453385 GetMouse.function()