Hello Iv made a Emergency coolant script But When Meltdown starts its auto starts and and it should work on a certion time eg 30 seconds left here is my script
if workspace:FindFirstChild("EmergencyGlass")~= nil then game.Workspace.EmergencyGlass:Destroy() end local g = Instance.new("Hint",game.Workspace) g.Text = "Emergency coolant activated!" wait(19) g:Destroy() local msg = Instance.new("Message") msg.Parent = game.Workspace msg.Name = 'OMG' msg.Text = "Self destruct sequence aborted." wait(24) msg.Text = "Warning Coolant unable to reach core. Self Destruct sequence re-intiated." game.Workspace.Gate.Countdown.Value.Value =40 wait(14) if game.Workspace:FindFirstChild("OMG")~=nil then game.Workspace.OMG:remove() end game.Workspace.Gate.Countdown.Disabled = true
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:
local value = game.Workspace.Wait.Value wait(value) --This will wait however long the value is - make sure it is a NumberValue or IntValue!
For the button pressing, you could use a ClickDetector in a brick
function onClicked(playerWhoClicked) --Run the cooldown/meltdown function end script.Parent.ClickDetector.MouseClick:connect(onClicked)
So the full script would be:
function onClicked(playerWhoClicked) --Run the cooldown/meltdown function if workspace:FindFirstChild("EmergencyGlass")~= nil then game.Workspace.EmergencyGlass:Destroy() end local g = Instance.new("Hint",game.Workspace) g.Text = "Emergency coolant activated!" wait(19) g:Destroy() local msg = Instance.new("Message") msg.Parent = game.Workspace msg.Name = 'OMG' msg.Text = "Self destruct sequence aborted." wait(24) msg.Text = "Warning Coolant unable to reach core. Self Destruct sequence re-intiated." game.Workspace.Gate.Countdown.Value.Value =40 wait(14) if game.Workspace:FindFirstChild("OMG")~=nil then game.Workspace.OMG:remove() end game.Workspace.Gate.Countdown.Disabled = true end 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!
How can i explain this So my Reactor Core runs off a master script Knows as gate it controls everything my countdown uses a Value to Work