The title says my problem with the script I'm using, can someone please tell me the problem. And if you require the script I will provide it :)
game.Players.PlayerAdded:connect(function(Player)
local Data = Instance.new("IntValue",Player)
Data.Name = "Data"
local XP = Instance.new("IntValue",Data)
XP.Name = "XP"
XP.Value = 0
local Level = Instance.new("IntValue",Data)
Level.Name = "Level"
Level.Value = 1
local Tries = Instance.new("IntValue",Data)
Tries.Value = 10
Tries.Name = "Tries"
local Data = Instance.new("IntValue",Player)
Data.Name = "leaderstats"
local Level = Instance.new("IntValue",Data)
Level.Name = "Level"
Level.Value = 1
XP.Changed:connect(function() XPChange(Player,XP,Level) end)
end)
function XPChange(Player,XP,Level)
if XP.Value >= Level.Value*150 then
XP.Value = 0
Level.Value = Level.Value+ 1
end
end

7 comments
Yes it would be helpful, did you accidentally use game.player instead of game.players? It’s recommended to use game:GetService(Players) anyway, if that’s the issue.
We gotta see the script.
Yeah... We need the script.
I gave script so it be easier to understand the problem
When I play this script in my game, nothing goes wrong in the Output... also use Connect instead of connect.
What line does this error happen? I've had this error appear when it actually meant something else. Also your XPChange() function will only change the Level under Leaderstats because you redefined the Level variable.
I've found out the problem with script thanks for helping anyway