So i made this script but it isnt working. please take a look:
script.Parent.Touched:connect(function(hit) if hit.Parent.Name == "B" then print("b touched") script.Parent.Parent.Parent.VechicleSeat.MaxSpeed = 0 end end)
The part B is touching it because ive seen it. Ive tried it with other stuff but it doesnt work still. I know it isnt working because its not printing anything. Ive also tried hit.Name and it still dont work. Any ideas?
The reason is that you didn't put If hit.Parent:FindFirstChild("Humanoid") then
So Heres the step
1.Put the script into a brick then copy this into script
Part.Touched:connect(function(HIT) local H = HIT.Parent:FindFirstChild("Humanoid") if H then script.Parent.Parent.Parent.VechicleSeat.MaxSpeed = 0 end end)
There you go! If this helped then accept the Answer please.
Ive given up so im just going to use wait inside the scripts
Thank you to everyone that tried to help :)