.Touched not working with local parts etc..
I've posted this on the scripting helpers forums, I'll post the whole post here as requested last time.
Right...
I just reworked the movement system of my game. It took me 2 days. I don't want to find out now that it STILL does not work! >.<
This is the game:
http://www.roblox.com/Traffic-Racer-V2-place?id=134174853
The issue is when a car hits another car, nothing happens!
I currently have this in a non-disabled local script inside a 'hit sensor' brick (which is the grey outline of the brick):
01 | function checkHit(part) |
02 | print ( "TOUCHED PART HAS BEEN HIT" ) |
03 | if part.Parent.Parent.Name = = "ModBlueCar" or "ModGreenJeep" or "ModPoliceCar" or "ModRedTruck" or "ModSchoolBus" or "ModSportsCar" then |
04 | if part.Parent.Parent.Name ~ = script.Parent.Name then |
05 | print ( "Game over, players car hit something." ) |
14 | script.Parent.Touched:connect(checkHit) |
Nothing prints and I'm getting scared ._.
I know I've not done the right parenting etc... I just want it to trigger the print function. Please can someone help >.<