My car's plugin value isn't working

I don’t know how to start this but I’m working on a chassis plugin that turns off the car the moment the value is true. Problem is that the script doesn’t work and there’s no error on the Console giving me a idea of the problem. And yes I am using A-Chassis. The goal is to make the script turn off the car the moment a value in a character’s Folder is enabled.

local CharacterTest = game.Players.LocalPlayer.Character

while true do
	wait(.05)
	if CharacterTest.Folder.TurnOffEngine.Value == true then
		script.Parent.Parent.IsOn.Value = false
	else
		script.Parent.Parent.IsOn.Value = true
	end
end

Can you tell me what:
print(CharacterTest.Folder.TurnOffEngine.Value)
Says?

And what kind of “Value” are you using, string value, integer value, bool value, etc.? (It could be because you are using the wrong value type).

hey, you can put it in the change function

CharacterTest.Folder.TurnOffEngine.Change:Connect(function(Value)
if Value then
script.Parent.Parent.IsOn.Value = false
else
script.Parent.Parent.IsOn.Value = true
end)

and remember, if you add scripts to the chassis, you must place them in the plugins folder

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.