I have a script that clones a sword based on a value. This is in a round system. The sword does not clone.
for _, player in ipairs(plrs) do
local character = player.Character
if character and #AvailableSpawnPoints > 0 then
character:FindFirstChild("HumanoidRootPart").CFrame = AvailableSpawnPoints[1].CFrame
table.remove(AvailableSpawnPoints, 1)
--Sword Clone
if not player.Backpack:FindFirstChild("sword") then
local swordsnum = player.Leaderstats.Swords.Sword
if swordsnum == 1 then
local classic = serverstorage.Swords.ClassicSword:Clone()
classic.Parent = player.Backpack
classic.Name = "sword"
print("1")
end
if swordsnum == 2 then
local Future = serverstorage.Swords.FutureSword:Clone()
Future.Parent = player.Backpack
Future.Name = "sword"
print("2")
end
if swordsnum == 3 then
local Light = serverstorage.Swords.LightSword:Clone()
Light.Parent = player.Backpack
Light.Name = "sword"
print("3")
end
if swordsnum == 4 then
local Dark = serverstorage.Swords.DarkSword:Clone()
Dark.Parent = player.Backpack
Dark.Name = "sword"
print("4")
end
if swordsnum == 5 then
local Devil = serverstorage.Swords.DevilSword:Clone()
Devil.Parent = player.Backpack
Devil.Name = "sword"
print("5")
end
if swordsnum == 6 then
local Doom = serverstorage.Swords.DoomSword:Clone()
Doom.Parent = player.Backpack
Doom.Name = "sword"
print("6")
end
end