Im new and need some help

I’m new to coding and trying to learn but for some reason I can’t seem to find this anywhere.
How do I detect when a leaderstat goes up, for instance, like a level?

I’ve looked everywhere and can’t find a solution, could you help?

If your leaderstats is a vaule you can detect if a leaderstat changed by

local value = (Your leaderstat)
value.Changed:Connect(function()
--Do your thing
end)
1 Like

im a builder not a scripter so i dont know much about this stuff

local value = (game.Players.LocalPlayer.leaderstats.Level)
value.Changed:Connect(function()
game.Players.LocalPlayer.leaderstats2.SP.Value + 1
end)

something goes before the game.players but I don’t know what

local value = game.Players.LocalPlayer.leaderstats.Level
value.Changed:Connect(function()
game.Players.LocalPlayer.leaderstats2.SP.Value = game.Players.LocalPlayer.leaderstats2.SP.Value + 1
end)

if you don’t know coding basics you can watch alvinblox or TheDevKing or go to the api references in the roblox developer hub maybe that will help