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

How do I weld roleplay food or what it is?

Asked by
Ron1Ronja -17
6 years ago

Um.. I never knew how to script! But I really wanna know how to weld a food tool! Can anybody show me how?

0
This is for scripters, not being rude but, if you don't know how to script, then don't be here User#20388 0 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago

function Weld(x,y) local W = Instance.new("Weld") W.Part0 = x W.Part1 = y local CJ = CFrame.new(x.Position) local C0 = x.CFrame:inverse()CJ local C1 = y.CFrame:inverse()CJ W.C0 = C0 W.C1 = C1 W.Parent = x end

function Get(A) if A.className == "Part" then Weld(script.Parent.Handle, A) A.Anchored = false else local C = A:GetChildren() for i=1, #C do Get(C[i]) end end end

function Finale() Get(script.Parent) end

script.Parent.Equipped:connect(Finale) script.Parent.Unequipped:connect(Finale) Finale() ---put this script in tool

Ad

Answer this question