I've tried numerous scripts and they aren't working? Can anyone please help??
function DisableDoors(player)
player.PlayerGui.TrainDriveGui.Screen.JunctionsTab.LeftDoors.LocalScript.Disabled = true
player.PlayerGui.TrainDriveGui.Screen.JunctionsTab.RightDoors.LocalScript.Disabled = true
end
function EnableDoors(player)
player.PlayerGui.TrainDriveGui.Screen.JunctionsTab.LeftDoors.LocalScript.Disabled = false
player.PlayerGui.TrainDriveGui.Screen.JunctionsTab.RightDoors.LocalScript.Disabled = false
end
if script.Parent.BodyVelocity.Velocity == Vector3.new(0, 0, 0) then
EnableDoors()
else
DisableDoors()
end

3 comments
Instead of using a loop, try using a .Changed event. That would probably be more effective and causes less lag.
That is true, I'll rewrite an example of that.
I'd use script.Parent.BodyVelocity:GetPropertyChangedSignal('Velocity'):Connect(function() --// Code here end)