I want the Part to weld to the Character's Head when the player spawns into the game. But, welding don't have the PlayerAdded event. How would I go about this?
function JustWelding (hit)
local humanoid = hit.Parent:FindFirstChild("Humanoid")
if humanoid then
local head = hit.Parent.Head
local torso = hit.Parent.Torso
script.Parent.CFrame = head.CFrame * CFrame.new(0,0,5)
local weld = Instance.new("Weld")
weld.Part0 = torso
weld.C0 = torso.CFrame:inverse()
weld.Part1 = script.Parent
weld.C1 = script.Parent.CFrame:inverse()
weld.Parent = script.Parent
script.Parent.Anchored = false
end
end
script.Parent.Touched:connect(JustWelding)
It works great with the touched event! Now I need it to do it when the character spawns into the game.
Help would be appreciated!

3 comments
Nothing happen.
Fixed the problem. Not sure why this works; I haven't used welds in a while.
Thank you.