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

Why is my part disappearing?

Asked by 10 years ago
local cleaver = script.Parent
local handle = cleaver.Parent.WheelHandle
local x = 8

function CleaverActivate()
    repeat
        cleaver.Position = Vector3.new(-26, x, -26.5)
    wait(0.000125)
    x = x-0.1
    until x == 4
    x=4
    repeat
        cleaver.Position = Vector3.new(-26, x, -26.5)
        wait(0.625)
        x = x+0.1
    until x == 8.4
end

handle.Touched:connect(function(p)
    if p.Parent:FindFirstChild("Humanoid") then
        CleaverActivate()
    end
end)

I don't know what's wrong.

Answer this question