How can i trigger a script via player, and not NPCs?
I'm an early scripter, but i wanted to know how you could detect a player touch using scripts. I'm making a game with ghosts in which chase you, and when touched, they die and respawn. The problem is that I include other NPCs in my game which also trigger the script. Here is the script i am using...
1 | ghost = script.Parent.Parent |
4 | local b = hit.Parent:FindFirstChild( "Humanoid" ) |
6 | ghost.Humanoid.Health = 0 |
9 | script.Parent.Touched:connect(onTouched) |
Also, the script being used is contained insided each humanoid 'LeftArm','UpperperTorso', 'Head' etc.
Any ideas on how to fix this?