Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Why cant this script find the Throttle of the seat?

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.

4 comments

0

Throttle is a property of VehicleSeat, you can't do WaitForChild becuase that looks for child objects, not properties.

0

Oh ok, do you have any idea why it cant find it then? Like it acts as if the throttle isnt there

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."

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.

1 answer

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

My friend helped me with this

This discussion is preserved as it was. New answers, comments, and votes are closed.