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

Help with .Touched()? [closed]

Asked by
iLegitus 130
9 years ago
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

Locked by woodengop, NinjoOnline, and Perci1

This question has been locked to preserve its current state and prevent spam and unwanted comments and answers.

Why was this question closed?

1 answer

Log in to vote
2
Answered by
woodengop 1134 Moderation Voter
9 years ago

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
Ad