Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-2

Why is this function not being called?

Asked by 6 years ago

So I have this script inside of a textlabel and it is not being called at all. It is supposed to change the text on the TextLabel and change it to a value being kept in server storage. I'm not sure what to do here is the code:

local storage = game.ServerStorage
local status = storage:WaitForChild("StatVal")

 function statUpdate()
local ss1 = status.Value.sub(1, 3)
print(ss1)
if ss1 == "Int" then
    for i = 5, 1 do
        script.Parent.Text = "Intermission" .. i
        wait(1)
    end
elseif ss1 ~= "Int" then
    script.Parent.Text = "Not intermission"
end
end

status.Changed:Connect(statUpdate)

also there is no error and the value is changing just not the text. Any help is appreciated :)

1 answer

Log in to vote
0
Answered by 6 years ago

Nevermind got it fixes!

Ad

Answer this question