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

it says leaderstats is not a valid member of Folder?

Asked by 4 years ago
1script.Parent.MouseButton1Down:Connect(function()
2    local plr = game.Players.LocalPlayer.leaderstats
3    local curStage = plr.leaderstats.Stage.Value
4    if plr.Skips.Value >= 1 then
5        plr.Skips.Value = plr.Skips.Value - 1
6        wait(.5)
7        workspace[plr.Name].HumanoidRootPart.CFrame = workspace.Spawns[curStage + 1].CFrame
8    end
9end)

1 answer

Log in to vote
2
Answered by 4 years ago
Edited 4 years ago

On line 2 you are referring to leaderstats as the player. The line should be:

1local plr = game.Players.LocalPlayer
0
Yes, it works now. Thanks itshydro7 1 — 4y
Ad

Answer this question