Why does this XP bar not working?
script.Parent.Parent.Parent.Parent.Parent.leaderstats.XOP.Value
I tried didn't work so i had to find a other why to get the stats.
local user = game.Players:GetPlayers()
local stats = user:findFirstChild("leaderstats")
xp = stats:findFirstChild("XOP")
lvl = stats:findFirstChild("Level")
while true do
wait()
local FR = ( xp.Value / (lvl.Value * 100))
script.Parent.Size = UDim2.new( FR , 0 , 0, 10)
end
Error:
Script 'Players.Player.PlayerGui.XPGui.Frame.Fill.Script', Line 2
and
Players.Player.PlayerGui.XPGui.Frame.Fill.Script:2: attempt to call method 'findFirstChild' (a nil value)

2 comments
user is a table, which means it doesn't have a FindFirstChild.
Is their another way to find leaderstats?