Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Can anybody help me with another thing about my reactor core meltdown?

Roblox is not giving me any errors but this script that I made called "GateStart" will not start "Gate". This is my script:

if game.Workspace.Temp.Value == 1750 then

	game.Workspace.Gate.Disabled = false

end

Like I said, Roblox is giving no errors for this code. Can anybody help?

4 comments

0

well according to what u wrote ur trying to tell the script to disable the gate once the temp reaches the value of1750 instead of starting the gate

0

I put disabled = false

0

so the script is called Gate and is a child of workspace

0

yes.

2 answers

✓ Accepted answer

try putting it in a while loop. by putting it in a while loop, it will constantly check to see if the given statement is true, otherwise it will only check once when the script first runs.

while wait() do

if workspace.Temp.Value == 1750 then

workspace.Gate.Disabled = false

end

end

3 comments

0

I got no error but "Gate" won't execute.

0

Gate says this:

0

script.Parent.alarm:Play() local g = Instance.new("Hint",Workspace) g.Text = "Self Destruct Seqence Activated!" wait(15) g:Destroy() script.Parent.alarm:Stop() script.Countdown.Disabled = false

Okay, what I noticed is that your code only works if the value is at 1750. If you want the code to work above or below that value, do this

if game.Workspace.Temp.Value => 1750 then
game.Workspace.Gate.Disabled = false --You can change this
else
if game.Workspace.Temp.Value <= 1750 then
		game.Workspace.Gate.Disabled = true --You can change this
end

3 comments

0

That's stupid. One sign should not have an equal sign.

0

Well, it works, buddy

0

it's <, > , = , == and >=.

This discussion is preserved as it was. New answers, comments, and votes are closed.