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

How do I use Welds to do this?

Asked by 9 years ago

I am trying to use welds to weld a brick to an NPCs back named Guy I cannot figure out how to do this can anybody help?

--[ NPC is named Guy ]--
--[ Brick is named Wing ]--

3 answers

Log in to vote
1
Answered by 9 years ago

To weld, you need to this:

local g = game.Workspace.Guy
local b = game.Workspace.Wing
local weld = Instance.new("Weld")

weld.Parent = g.Torso
weld.Name = b.Name.. "Weld"
weld.Part0 = g.Torso
b.CanCollide = false
b.CFrame = g.Torso.Position - Vector3.new(0,0,2) -- change if it's in the wrong place
weld.Part1 = b

Unless, of course, you're just putting on a non-moving NPC's back, which in this case, you just Anchor the brick and move it to where you want it.

Ad
Log in to vote
0
Answered by 9 years ago

I would recommend Jojomen56's utility plugin.

To install it, save your place and open the link in Roblox Studio then click the install button.

To use it, open a new window of roblox studio and load your place. Click on the plugin's icon in the toolbar thing at the top of roblox studio and click on the second icon from the left at the top of the window that pops up. Click on the middle button, with the two parts and a plus symbol. Select Guy and then Wing (Doing it in this order will make sure the brick is welded to Guy, rather than Guy being welded to the brick.). Guy should have an orange selection box and Wing should have a purple selection box. Click the big green "Weld" button to weld the two things together.

Log in to vote
0
Answered by 9 years ago

Alternate Solution

1) Insert a Weld Object

2) Manually set Part0 (base of weld) and Part1 (part being welded to the base) via the command line (givenweld.Part0 = part and givenweld.Part1 = part2)

3) If the positions are wrong, set givenweld.C1 to whatever it needs to be

4) If this still doesn't work, search up Quenty's "Custom Weld Script"

Answer this question