I want to attach a part to a character when they spawn in which works when joining the game but not when respawning and I haven't been able to figure it out
game.Players.PlayerAdded:Connect(function(player)
local character = player.Character or player.CharacterAdded:Wait()
local Hitbox = game.ReplicatedStorage.Hitbox:Clone()
Hitbox.Parent = character
local Weld = Instance.new("Weld", Hitbox)
Weld.Name = "Weld"
Weld.Part0 = Hitbox
Weld.Part1 = character.HumanoidRootPart
end)
