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
script.Parent.MouseButton1Down:Connect(function()
    local plr = game.Players.LocalPlayer.leaderstats
    local curStage = plr.leaderstats.Stage.Value
    if plr.Skips.Value >= 1 then
        plr.Skips.Value = plr.Skips.Value - 1 
        wait(.5)
        workspace[plr.Name].HumanoidRootPart.CFrame = workspace.Spawns[curStage + 1].CFrame 
    end
end)

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:

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

Answer this question