How do I get the players object from a script, when it touches something?

I can’t seem to get the player object from a script, even if I use .Touched event, and then touched.Parent, even though I can get the players name with touched.Parent.Name.

Can You Exactly Say What Do You Mean? You Mean Get Access To Local Player When the Player Touched Part?

yes the local player, when a player touches a part, I’m trying to send a remote event, from a script inside that part. But to send fireclient, I need the “player object”.

You Have To Use:


script.Parent.Touched:Connect(function(Character)
local CharacterName = Character.Parent.Name
local LocalPlayer = game.Players:FindFirstChild(CharacterName)
print("Script Founded Local Player!")
end)

This May Only Work At Normal Script. Not Local Script! But Try Both Of Them.

1 Like