I see some code like this:

script.Parent.MouseButton1Click:Connect(function(Player)

end)

Where do they get this player parameter from? When you type out an event, it tells you the parameters, if it has any. The GuiButton.MouseButton1Click has no events.

What these people need to know is that if an event by default passes the player as a parameter, it’s a server side only event. Take for example, the RemoteEvent.OnServerEvent event of RemoteEvent.

Do these people not know that they can just use Players.LocalPlayer to get the player (since these scripts are local)? The most common mistake is using LocalPlayer in the server, and just doesn’t make sense they stop relying on LocalPlayer, and just add a parameter because they feel like it.

1 comment