Basically I made this script for my train crossing. Its like one of those electric boxes that the workers use to control it. The GUI giver works but the Scripts in the GUI don't work.
I will start you off with some code here. I got 4 buttons, I'm thinking I simply forgot something very easy. Help would be appreciated.
This is the one which turns the crossing signal on
script.Parent.MouseButton1Down:connect(function()
game.Workspace.crossing1.state = true
end)
This turns the crossing signal off
script.Parent.MouseButton1Down:connect(function()
game.Workspace.crossing1.state = false
end)
I also have 2 other buttons for disabling and enabling the crossing here is the first one. This enables the crossing.
script.Parent.MouseButton1Down:connect(function()
game.Workspace.crossing1.state = false
game.Workspace.crossing1.Script.Disabled = false
end)
And this one disables the crossing.
script.Parent.MouseButton1Down:connect(function()
game.Workspace.crossing1.state = false
game.Workspace.crossing1.Script.Disabled = true
end)
Thanks for the help :)

1 comment
Also the this code is all in different scripts, not LOCAL.