i wrote a script like this i saw it in youtube but it's not working
1 | script.parent.Touched:connect(Function(hit) |
2 |
3 | hum = hit.Character:FindFirstChild( "Humanoid" ) |
4 | hum:TakeDamage( 10 ) |
5 |
6 | end ) |
can any body tell me what's wrong with this?
Parent should have a big P. Why are you using Character? The object is already in workspace. Use Hit.Parent:FindFirstChild("Humanoid")
Character gets the character if the object is inside the player folder. Anything inside the player folder is not an object that can register a touched event.