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

Why is this function not being called?

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

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