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

Why isn't this welding script working in the command bar?

Asked by 9 years ago

I have a welding script I want to assign to a tool in workspace named "Long Bow". Here's the script:

local t = workspace["Long Bow"]
local h = t.Handle
local e = {}

for i,v in pairs(t:GetChildren()) do
    if v:IsA("BasePart") then
        local w = Instance.new("Weld", game.JointsService)
        w.C1 = v.CFrame:toObjectSpace(h.CFrame)
        w.Part0 = h
        w.Part1 = v
        table.insert(e, w:Clone())
    end
end

for i,v in pairs(e) do
    v:Clone().Parent = game.JointsService
end

When I put this in a script in Workspace or inside the tool, it works fine. But when I paste it into the command bar it doesn't do anything. Why is that?

0
Try :MakeJoints() EzraNehemiah_TF2 3552 — 9y
0
Still nothing :/ whyOmustOitObeOme 7 — 9y
0
May its JointsService() woodengop 1134 — 9y

Answer this question