So when i cloned my character in a script and try to set some propities on it the character is = nil. Here is my script
script.Parent.RemoteEvents.BigSwingStarting.OnServerEvent:Connect(function(Player)
local Char = Player.Character:Clone()
Char.Parent = Player.Character
for i, v in pairs(Char:GetChildren()) do
if v.ClassName ~= "Part" then
v:Destroy()
end
end
Char.Parent = Player.Character
local Prime = Char:FindFirstChild("Head")
Prime:SetUnion(Char:GetChildren())
Prime.Position = Player.Character.Head
end)
Please reply if u know the solution