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

why isnt this welding...?

Asked by 8 years ago
local ball = script.Parent

local debounce = false

function grab(hit)
    if debounce == false then
        debounce = true
        local x = hit.Parent:FindFirstChild("Torso")
        if x then
                local weld = Instance.new("Weld", hit.Parent)
                weld.Part0 = x
                weld.Part1 = ball
                weld.C1 = CFrame.new(0, 1, 0)
                wait(2)
                debounce = false
                end
            end
        end

ball.Touched:connect(grab)


Answer this question