TextLabel not changing

I was having some trouble with changing a textlabel. I’m trying to create a sort of math test, but nothing is showing up inside the textLabel. What’s wrong with this LocalScript inside of the TextLabel that I want to change?

local randomFirst = math.random(1,100)
local randomSecond = math.random(1,100)
local randomOperation = math.random(1,4)
if randomOperation == 1 then
	randomOperation="+"
end
if randomOperation == 2 then
	randomOperation="-"
end
if randomOperation == 3 then
	randomOperation="*"
end
if randomOperation == 4 then
	randomOperation="/"
end

local contents = script.Parent.Text
wait(10)
contents = randomFirst .. randomOperation .. randomSecond
1 Like

just remove the local contents line and change the last line to this:

script.Parent.Text = randomFirst .. randomOperation .. randomSecond
2 Likes