Yes, I would but you don’t have to. It should be a number value if you ever think you will work with decimals.
If you want to keep it as a string, then do this:
local status1 = game.ReplicatedStorage:WaitForChild("Status1")
script.Parent.Text = status1.Value
status1.Changed:Connect(function()
script.Parent.Text = status1.Value
end)
status1.Value = 9
script.Parent.MouseButton1Click:Connect(function()
print ("Something new")
if tonumber(status1.Value) == 9 then
status1.Value = 9
else
status1.Value = tonumber(status1.Value) + 1
end
end)
That may work, but it’s better to change it to NumberValue or a IntValue for easier use. Check the ClassName to see if the value is a StringValue in the properties tab.
Here is a screenshot of the UI thing. What I want is that everytime someone click the text button the number goes up until it hits nine the it will turn to 0 again.