I wanted to make a door that opens when the value reaches 0.
Also the text that tells when the door is going to open and the status doesn't change!
Help?
local value = script.Parent.Value is a NumberValue
local value = script.Parent.Value
door = script.Parent.Door
local text = script.Parent.Parent.Model.Frame.SurfaceGui.Number.Text
local statest = script.Parent.Parent.Model.Frame.SurfaceGui.StatTitle.Text
while wait(1) do
value.Value = value.Value -1
text = "Time:"..value.Value
if value.Value >= 1 then
door.Transparency = .5
door.CanCollide = false
elseif value.Value <= 0 then
statest = "Status: Open"
value.Value = 10
text = "Time:"..value.Value
elseif value.Value <= 0 then
door.Transparency = 0
door.CanCollide = true
text = "Time:"..value.Value
statest = "Status: Close"
end
end

4 comments
Is the variable 'value' a reference to a NumberValue named Value?
Yep
I don't know Im kinda new to scripting but don't you have to have a space between else and if?
There is no space between else and if, it won't work like that.