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

How would I make a Custom Character apply to a player with certain leaderstats?

Asked by 3 years ago
Edited 3 years ago

I currently have a script that gives the player the character once they have 32 points

local Avatar = game:GetService("ReplicatedStorage"):FindFirstChild("ArmorBoost").K

game.Players.PlayerAdded:Connect(function(player)
    if player:WaitForChild("leaderstats").Difficulty.Value >= 32 then
        local PlayerAvatar = Avatar:Clone()
        PlayerAvatar.Parent = game:GetService("StarterPlayer")
        PlayerAvatar.Name = "StarterCharacter"
        wait(0.1)
        player:LoadCharacter() 
    end
end)

This works, but it applies it to ALL Players. Not just one. What do I do?

0
Could you please format your code? I can't read it. Clooouudy 20 — 3y
0
Apologies for that. I just formatted it. BirthWormSaiiy 48 — 3y

Answer this question