In my game I want to add this script and then destroy it and readd it but when I do so it no longer works so is there a way for this to activate when the player respawns??
game.Players.PlayerAdded:connect(function(player)
player.CharacterAdded:Connect(function(Ch)
local g = script.Arm1:clone()
g.Parent = Ch
local C = g:GetChildren()
for i=1, #C do
if C[i].className == "Part" then
local W = Instance.new("Weld")
W.Part0 = g.Middle
W.Part1 = C[i]
local CJ = CFrame.new(g.Middle.Position)
local C0 = g.Middle.CFrame:inverse()*CJ
local C1 = C[i].CFrame:inverse()*CJ
W.C0 = C0
W.C1 = C1
W.Parent = g.Middle
end
local Y = Instance.new("Weld")
Y.Part0 = Ch["Left Arm"]
Y.Part1 = g.Middle
Y.C0 = CFrame.new(0, 0.4, 0)
Y.Parent = Y.Part0
end
local h = g:GetChildren()
for i = 1, # h do
if h[i].className == "Part" then
h[i].Anchored = false
h[i].CanCollide = false
end
end
end)
end)

4 comments
CharacterAdded is when the player spawns / respawns
That's what I thought so I wonder why this stops working if it is deleted and then readded?
Try adding a wait before the objects will be loaded; that's sometimes the problem in these cases. ;/
Dang it, Didn't work