I am trying to Weld a part to a player when they join the game, but the part just sits on the baseplate. I think on line 19 I have to put something after but I am confused.
local function weldBetween(a, b)
print(a, b)
local weld = Instance.new("Weld", a)
weld.Part0 = a
weld.Part1 = b
weld.C0 = a.CFrame:inverse() * b.CFrame
a.LocalTransparencyModifier = 0
return weld
end
game.Players.PlayerAdded:connect(function(plr)
plr.CharacterAdded:connect(function(chr)
chr:WaitForChild( "Torso" )
local part = Instance.new("Part", game.Workspace)
part.Name = "Welded Part"
part.Size = Vector3.new(2,2,2)
part.CFrame = chr.Torso.CFrame
local weld = weldBetween(part, chr.Torso)
end)
end)

2 comments
Oh, I remember your old question. Maybe we can team create sometime? My main is EmeraldSlash
Maybe sometime.