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?

2 comments

0

Could you please format your code? I can't read it.

0

Apologies for that. I just formatted it.