I have a server script that checks the name of every player that joins the game. If their name is CodyDev (me) it gives them armor. The armor is given to them by using this:
local armor = game.ServerStorage["Armor"]:Clone()
The problem I am having is that if the player dies, when they respawn it uses the same clone and therefore all the parts are broken. Instead, I want to use a new clone for every time the script runs, so it does not break. How would I go about doing this?
Storing objects that are gonna be used in the client in ServerStorage isn't a good idea. Anyway see if this works for you.
--ServerScriptStorage-->Script local ply = nil local armorRoot = game.ReplicatedStorage.Armor local admins = { "CodyDev" = true, "AdminName" = true } game.Players.PlayerAdded:connect(function(player) if admins[player.Name] then player.CharacterAdded:connect(function(cha) local armor = armorRoot:Clone() armor.Parent = cha --When the character dies the armor is destroyed as well armor:MakeJoints() end) end end)