Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do i fix leaderstats is not a valid member of player? [closed]

Asked by 4 years ago
Edited 4 years ago

local Player = game.Players.LocalPlayer

local points = Player.leaderstats.Points

0
Please explain clearer. We don't know what problem you wrong. Xapelize 2658 — 4y
0
ok xTheodxre 16 — 4y
0
it says that leaderstats is not a valid member of folder xTheodxre 16 — 4y
0
Done I did an answer, hope I helped. Xapelize 2658 — 4y

Closed as Non-Descriptive by maumaumaumaumaumua and hiimgoodpack

This question has been closed because its title or content does not adequately describe the problem you are trying to solve.
Please ensure that your question pertains to your actual problem, rather than your attempted solution. That is, you were trying to solve problem X, and you thought solution Y would work, but instead of asking about X when you ran into trouble, you asked about Y.

Why was this question closed?

1 answer

Log in to vote
0
Answered by
Xapelize 2658 Moderation Voter Community Moderator
4 years ago

Ok, I was so confused, Now I finally know what you mean.

Honestly, leaderstats are not a part of Player. If you want to create a leaderstats, insert a script In ServerScriptService.

The script:

game.Players.PlayerAdded:connect(function(p) -- p means player
 local stats = Instance.new("IntValue")
 stats.Name = "leaderstats"
 stats.Parent = p

 local money = Instance.new("IntValue")
 money.Name = "Points" -- Change "Points" to other things that you wanted
 money.Value = 50 -- Change the value to how many you want when the player joins the game
 money.Parent = stats 
end)

You can't just find leaderstats inside Player, so just creates them!

Hope I helped, and please explain clearer next time! Cya!

0
ok thx xTheodxre 16 — 4y
0
np and if worked then accept the answer Xapelize 2658 — 4y
Ad