Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Help with .Touched()?

script.Parent.Touched:connect(function(hit)
hit.Parent -- Ect
end

So i want it to find the hit.parent's Player not its character? Help quickly please,Its for a limited time thing

1 answer

✓ Accepted answer

That's where GetPlayerFromCharacter comes in handy, example script:

script.Parent.Touched:connect(function(hit)
local plr=game.Players:GetPlayerFromCharacter(hit.Parent)--It's getting the Player from the Hit.Parent, which is the Character.
print(plr.Name)
end)
  • TheContinentofEurope

This discussion is preserved as it was. New answers, comments, and votes are closed.