local char1 = --location of 1 of the chars
local char2 = --location of the other
game.Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(char)
local choice = math.random(1,2)
if choice == 1 then
char = char1:Clone()
else
char = char2:Clone()
end
end)
end)
local char1 = --location of 1 of the chars
local char2 = --location of the other
game.Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(char)
local choice = math.random(1,2)
if choice == 1 then
local newchar = char1:Clone()
for i,v in pairs(char:GetChildren()) do
if not v:IsA("Humanoid") then
v:Destroy()
end
end
for i,v in pairs(newchar:GetChildren()) do
if not v:IsA("Humanoid") then
v.Parent = char
end
end
newchar:Destroy()
else
local newchar = char2:Clone()
for i,v in pairs(char:GetChildren()) do
if not v:IsA("Humanoid") then
v:Destroy()
end
end
for i,v in pairs(newchar:GetChildren()) do
if not v:IsA("Humanoid") then
v.Parent = char
end
end
newchar:Destroy()
end
end)
end)
oh, well in the part that I was cloning the stuff from the “newchar”, do this instead (for each):
for i,v in pairs(newchar:GetChildren()) do
if not v:IsA("Humanoid") then
v.Parent = char
if v == newchar.PrimaryPart then
char.PrimaryPart = v
end
end
end