game.Players.PlayerAdded:Connect(function(plr) print("plr joined") plr.CharacterAdded:Connect(function(char) wait(5) for i = 1,10 do print("Ragdoll starting") wait(1) end local bv = Instance.new("BoolValue", char) bv.Name = "RagdollTime" local hum = char:WaitForChild("Humanoid") local H0 = Instance.new("Attachment") H0.Name = "HeadAttachment0" H0.Parent = char.Torso local H1 = Instance.new("Attachment") H1.Name = "HeadAttachment1" H1.Parent = char.Head local H = Instance.new("BallSocketConstraint") H.Attachment0 = H0 H.Attachment1 = H1 H.Parent = char.Torso local LA1 = Instance.new("Attachment") LA1.Name = "LArmAttachment1" LA1.Parent = char["Left Arm"] local LA = Instance.new("BallSocketConstraint") LA.Attachment0 = H0 LA.Attachment1 = LA1 LA.Parent = char.Torso local RA1 = Instance.new("Attachment") RA1.Name = "RArmAttachment1" RA1.Parent = char["Right Arm"] local RA = Instance.new("BallSocketConstraint") RA.Attachment0 = H0 RA.Attachment1 = RA1 RA.Parent = char.Torso local LH1 = Instance.new("Attachment") LH1.Name = "LHrmAttachment1" LH1.Parent = char["Left Leg"] local LH = Instance.new("BallSocketConstraint") LH.Attachment0 = H0 LH.Attachment1 = LH1 LH.Parent = char.Torso local RH1 = Instance.new("Attachment") RH1.Name = "RHrmAttachment1" RH1.Parent = char["Right Leg"] local RH = Instance.new("BallSocketConstraint") RH.Attachment0 = H0 RH.Attachment1 = RH1 RH.Parent = char.Torso hum.PlatformStand = true for i,v in pairs(char.Torso:GetChildren()) do if v:IsA("Motor6D") then v:Destroy() end end end) end)
nothing prints out btw
Mark this as the accepted answer if it solves your question.
Instead of having a nested event, all you need to do is wait for the character to load via a WaitForChild:
game.Players.PlayerAdded:Connect(function(plr) print("plr joined") local char = plr:WaitForChild("Character") --replace the event with a wait and it might solve your problem wait(5) for i = 1,10 do print("Ragdoll starting") wait(1) end local bv = Instance.new("BoolValue", char) bv.Name = "RagdollTime" local hum = char:WaitForChild("Humanoid") local H0 = Instance.new("Attachment") H0.Name = "HeadAttachment0" H0.Parent = char.Torso local H1 = Instance.new("Attachment") H1.Name = "HeadAttachment1" H1.Parent = char.Head local H = Instance.new("BallSocketConstraint") H.Attachment0 = H0 H.Attachment1 = H1 H.Parent = char.Torso local LA1 = Instance.new("Attachment") LA1.Name = "LArmAttachment1" LA1.Parent = char["Left Arm"] local LA = Instance.new("BallSocketConstraint") LA.Attachment0 = H0 LA.Attachment1 = LA1 LA.Parent = char.Torso local RA1 = Instance.new("Attachment") RA1.Name = "RArmAttachment1" RA1.Parent = char["Right Arm"] local RA = Instance.new("BallSocketConstraint") RA.Attachment0 = H0 RA.Attachment1 = RA1 RA.Parent = char.Torso local LH1 = Instance.new("Attachment") LH1.Name = "LHrmAttachment1" LH1.Parent = char["Left Leg"] local LH = Instance.new("BallSocketConstraint") LH.Attachment0 = H0 LH.Attachment1 = LH1 LH.Parent = char.Torso local RH1 = Instance.new("Attachment") RH1.Name = "RHrmAttachment1" RH1.Parent = char["Right Leg"] local RH = Instance.new("BallSocketConstraint") RH.Attachment0 = H0 RH.Attachment1 = RH1 RH.Parent = char.Torso hum.PlatformStand = true for i,v in pairs(char.Torso:GetChildren()) do if v:IsA("Motor6D") then v:Destroy() end end end)