Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 3 years ago
Edited 3 years ago

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)

0
turn off cancollide and make it massless vinhthai00 1 — 3y
0
it already was SilverishReign 75 — 3y
0
Make "clone()" to "Clone()". Also, "connect" is deprecated, use "Connect" instead. NotTheChara 191 — 3y

1 answer

Log in to vote
0
Answered by 3 years ago
Edited 3 years ago

I would suggest using qPerfection Weld.

I can link it down if you need it.

All you need to do is anchor the part before you run the game and the script will unanchor it, weld it and all scripts work.

Links aren't working...

https://www.roblox.com/library/181259635/qPerfectionWeld-Perfect-welding-for-EVERY-situat

Ad

Answer this question