I'm trying to make a script, so that when the value of one text label equals the max level of Exp, the 2nd text label will update the level by one, and the 1st text label goes back 0, while the max Exp required to level up is increased by 1.5
Here is the script
local StatsFolder = script.Parent.Parent.Parent.Parent:WaitForChild("Stats")
local ExpIntValue = StatsFolder.Exp
local LevelValue = StatsFolder.Level
local MaxExp = StatsFolder.MaxExp
LevelValue.Value = 1
script.Parent.Text = "Exp: "..ExpIntValue.Value.."/ "..MaxExp.Value
ExpIntValue:GetPropertyChangedSignal("Value"):connect(function()
MaxExp.Value = LevelValue * 1.5
print(MaxExp)
if ExpIntValue == MaxExp then
LevelValue.Value = LevelValue.Value + 1
ExpIntValue.Value = 0
end
script.Parent.Text = "Exp: "..ExpIntValue.Value.."/ "..MaxExp.Value
end)

4 comments
Are "ExpIntValue" and "LevelValue" int values(or any type of value)?
What is "script.Parent.Parent.Parent.Parent"