Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

What went wrong with my script (welding part to player)?

The goal of this script is to weld a part (the part has scripts and other things inside) to the player as soon as they join the game. The part does not weld at all where exactly did I go wrong?

game.Players.PlayerAdded:connect(function(plr)	
		
local p = game.Workspace:FindFirstChild("Character2"):clone()
p.Parent = plr.Character
p.CFrame = CFrame.new(plr.Character.Torso.Position)
p.Anchored = false

local Y = Instance.new("Weld")
Y.Part0 = plr.Character.Torso
Y.Part1 = p
Y.Parent = Y.Part0
	plr.CharacterAdded:connect(function(char)	
end)

3 comments

0

turn off cancollide and make it massless

0

it already was

0

Make "clone()" to "Clone()". Also, "connect" is deprecated, use "Connect" instead.

1 answer

This discussion is preserved as it was. New answers, comments, and votes are closed.