Attempt to index nil with "Hit"

		local mouse = plr:GetMouse()
		local magnitude = (plr.Character.HumanoidRootPart.Position - mouse.Hit.Position).Magnitude

Attempt to index nil with “Hit”
I can’t see any error with this, I have a valid player parameter (this is in a remote event)
Did I do something wrong, or can the mouse really only be gotten on the client? I really don’t want to create a ton of extra steps just to get the mouse position, so is there some other way I can do this if there isn’t an easy solution?

1 Like

The mouse can only be gotten on the client. This is stated here: Mouse

If this is a tool you can get the mouse from its .Equipped event.

https://developer.roblox.com/en-us/api-reference/event/Tool/Equipped