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 2 years ago
Edited 2 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 — 2y
0
Apologies for that. I just formatted it. BirthWormSaiiy 48 — 2y

Answer this question