Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why cant this script find the Throttle of the seat?

Asked by 5 years ago
while script.Parent.Parent.char.Throttle == 1 do
 wait()
print ("throttle is 1")
end




No errors, I did WaitForChild and it said it would just wait for infinite.

0
Throttle is a property of VehicleSeat, you can't do WaitForChild becuase that looks for child objects, not properties. chomboghai 2044 — 5y
0
Oh ok, do you have any idea why it cant find it then? Like it acts as if the throttle isnt there TheOwlFromSaturn 26 — 5y
0
try printing script.Parent.Parent.char.Throttle. You are most likely getting "0" because the wiki says "Will refresh back to 0 unless constantly set." chomboghai 2044 — 5y
0
Ok when I do -----print(script.Parent.Parent.char.Throttle)------ it prints the actual throttle. I also thought to change the "1" in Thorottle == 1 and it worked. But When I changed it to 1 and tested it by both getting in the seat and holding w and manually changing its value to 1, it doesnt print as if its not updating when it is. TheOwlFromSaturn 26 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago

~~~~~~~~~~~~~~~~~while wait() do if script.Parent.Throttle ~= 0 then print("1") end end

~~~~~~~~~~~~~~~~~

My friend helped me with this

Ad

Answer this question