Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Remote Event getting a player?

Asked by 6 years ago

I have a server script and i need to get the character.

I have this:

local player = game:GetService("Players"):GetPlayerFromCharacter(hit.Parent)

but it does not work im using it in a remote event

so its more like this

local errorevent = game.ReplicatedStorage.RemoteEvents.Error
local player = game:GetService("Players"):GetPlayerFromCharacter(hit.Parent)
errorevent:FireClient(player)

Answer this question