I’m doing something that when an npc touches you an animation is played but I don’t know how
realize if the dummy touches a player, anyone can help me?
You can make it so when the Dummy is touched or the Dummy touches something, you can get the Parent of what hit it and use Players:GetPlayerFromCharacter()
on that Parent to detect if the dummy has touched a player
The way you can do this can depend on what is needed, you can probably have a hitbox around the dummy (which is just an invisible canCollide false part around the dummy) that does something if whatever touched was a Player’s character, or other methods, but the general idea is to use the method of the Player’s service as it would return the Player instance if what touched was the Player’s Character, or nil if it wasn’t a Player’s character
Dang, you’re good at solving these problems at record speed lol.
That API was helpful to me when i making touch detection for player, there’s so much we can do with simple API
Two replies from Scripters real quick.
So cool to see dev’s willing to help each other