0

# why wont this leader board script work when i run the game?

why wont this work? when i play it nothing happens.

function OnPlayerJoin(player)

local points = Instance.new("IntValue",player)
points.Name = "Points"

end


0
its still not showing up for some reason. KNOSIS 8 — 1y

-1

function OnPlayerJoin(player)

local points = Instance.new("IntValue")
points.Name = "Points"

end



First, Points has to be in leadertstats, not the player. Second, it's better not to use the parent argument of Instance.new

0
nothing is showing up still for some reason, maybe its something wrong with my studio? KNOSIS 8 — 1y
0
Where's your leaderboard script located in studio? Maybe that's the reason. NoahsRebels 99 — 1y
0
its in serverscriptservice KNOSIS 8 — 1y
0
Did you make sure it's not disabled? I tested it in my studio and it works fine. NoahsRebels 99 — 1y
0
nope its not diabled KNOSIS 8 — 1y
0
And there aren't any errors in output? NoahsRebels 99 — 1y
0
no the output is blank KNOSIS 8 — 1y
0
is the leader board script in a local script, or a regular script? DrDextrous -3 — 1y
0
it worked, i had it in a local script at first, then i put it into a regular one, and its working now. thank KNOSIS 8 — 1y
1
sO_Ov 275
1 year ago

the parent of "Points" is a player, when it should be the leaderstats

function OnPlayerJoin(player)

points.Name = "Points"

end


0
Tested and working sO_Ov 275 — 1y
0
sheepposu 561
1 year ago
Edited 1 year ago
function OnPlayerJoin(player)