Answered by
8 years ago Edited 8 years ago
I'm struggling to understand your question here, but if you want to wait a certain amount of time that is in a value, you could do something like:
1 | local value = game.Workspace.Wait.Value |
For the button pressing, you could use a ClickDetector in a brick
1 | function onClicked(playerWhoClicked) |
5 | script.Parent.ClickDetector.MouseClick:connect(onClicked) |
So the full script would be:
01 | function onClicked(playerWhoClicked) |
03 | if workspace:FindFirstChild( "EmergencyGlass" )~ = nil then |
04 | game.Workspace.EmergencyGlass:Destroy() |
06 | local g = Instance.new( "Hint" ,game.Workspace) |
07 | g.Text = "Emergency coolant activated!" |
10 | local msg = Instance.new( "Message" ) |
11 | msg.Parent = game.Workspace |
13 | msg.Text = "Self destruct sequence aborted." |
15 | msg.Text = "Warning Coolant unable to reach core. Self Destruct sequence re-intiated." |
16 | game.Workspace.Gate.Countdown.Value.Value = 40 |
18 | if game.Workspace:FindFirstChild( "OMG" )~ = nil then |
19 | game.Workspace.OMG:remove() |
21 | game.Workspace.Gate.Countdown.Disabled = true |
24 | script.Parent.ClickDetector.MouseClick:connect(onClicked) |
If this helps, please "Accept Answer" - if not, be sure to comment with another clearer explanation of what you mean!