FireClient is given an object for its second argument, returns playername instead..?

local script:

server script:
image

Output:
image

Ignoring the comically nonexistent use of sanity checking, (you should be calculating magnitude on the server) you’re passing the local player to the server as the first argument. The client isn’t intended to send itself to the server, or impersonation would be dead simple. Fire the server with just the part from the client. The player argument will always be first with OnServerEvent and OnServerInvoke.

PS: Why don’t you indent your scripts? They look much more organized that way.

1 Like

I’ve never indented my scripts, I find them to jarring too read that way.

Either way, thank you

1 Like

You don’t need to send the player as an argument, it’s automatically done.

so part is actually game.Players.LocalPlayer.

Just remove the game.Players.LocalPlayer and it’ll work like you want it to.

2 Likes

Don’t forget to mark people’s answers as the solution :slight_smile:

1 Like