I have made a script where you click a GUI and a RemoteEvent is fired to insert a model into the game and I'm trying to find the players mouse so that it is attached to the mouse. The trouble is how I can go about doing this.
How would I go about finding the players mouse since I don't believe local Mouse = Player:GetMouse() works in server scripts.
Thing is, Roblox stopped things like the player's mouse from replicating to the server automatically a while ago when they introduced filtering. Good, perfect - Now everyone's scripts are broken. The solution? RemoteEvents.
Thing is, you can just get the player's mouse locally and then keep telling the server the information you need from it, such as where it is pointing, or which parts it is touching.
But, we can do one better - We can just ignore the server entirely until everyone needs to know about the mouse. Placement scripts? Just say where you're placing it, and do all of the positioning locally. Server never has to know. Build tools? Same deal. Guns? Yep. The server is dumb. Keep it that way.