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

How do i change gui text to a Value?

I need a Text Lable change it self to a number from a number Value

this is my code in a local script in the lable: lable = script.Parent

CardLvl = game.Workspace.CardLevel

while true do
	if CardLvl == 1 then 
		lable.Text = 1
	elseif CardLvl == 2 then
		lable.Text = 2
	elseif CardLvl == 3 then
		lable.Text = 3
	elseif CardLvl == 4 then
		lable.Text = 4
	elseif CardLvl == 5 then
		lable.Text = 5
	end
end

The "CardLvl" is the value

1 answer

✓ Accepted answer

Put the script on the button so it works

local CardLvl = game.Workspace.CardLevel
local label = script.Parent

CardLvl.Changed:Connect(function(NewValue)
	print(NewValue)
	label.Text = NewValue
end)

Accept the answer if it works!

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