Conveyor script not disabling

I want to disable this conveyor script when I press a button, but its not working, any ideas?

conveyor:

local conveyor = script.Parent
conveyor.Velocity = conveyor.CFrame:vectorToWorldSpace(Vector3.new(0, 0, -conveyor.Configuration.Speed.Value))

button:

local turnoff = script.Parent.turnoff
local turnon = script.Parent.turnon

local c1 = workspace.MiscParts.Conveyors.c1.Script

turnon.Triggered:Connect(function()

	c1.Disabled = false

	turnoff.Enabled = true
	turnon.Enabled = false

end)

turnoff.Triggered:Connect(function()

	c1.Disabled = true
	
	turnoff.Enabled = false
	turnon.Enabled = true
	
end)
1 Like

If you disable a script then it won’t change the values of the Conveyor.
Try just setting the Conveyor.Velocity value to (0,0,0) instead to shut it off.

1 Like

i did that before but the script doesnt detect the change in value.

Take the script out of the Conveyor.
Use the velocity line you have in the Conveyor’s script and put it in your ‘on’ section of script.
Use the same line but change the velocity to (0,0,0) for the ‘off’ section of script.

2 Likes

oh, lol. sorry, I’m dumb. Thanks for your help!

2 Likes