#Model glitches out when i try to move it upwards while keeping the rotation

1 messages · Page 1 of 1 (latest)

severe dome
#

so the idea is the spike shoots up from the ground and goes back, but it glitches like in the video below, heres the code:

local Workspace = game:GetService("Workspace")
local Icespike1 = Workspace:FindFirstChild("Icespike1")


local positions = {
    Vector3.new(16.815, -112, -124.477), 
    Vector3.new(16.815, -102, -124.477),
    Vector3.new(16.815, -92, -124.477),
    Vector3.new(16.815, -82, -124.477),
    Vector3.new(16.815, -65, -124.477)  
}

local orientationY = math.rad(-90)
local orientationZ = math.rad(5.342)

while true do
    task.wait(3)
    local rng = math.random(1, 5)

    local baseCFrame = CFrame.new(positions[1]) * CFrame.Angles(0, orientationY, orientationZ)
    Icespike1:PivotTo(baseCFrame)

    if rng == 3 then

        for i, pos in positions do
            local moveCFrame = CFrame.new(pos) * CFrame.Angles(0, orientationY, orientationZ)
            Icespike1:PivotTo(moveCFrame)
            task.wait(0.01)
        end

        
        task.wait(2)

        for i = #positions, 1, -1 do
            local moveCFrame = CFrame.new(positions[i]) * CFrame.Angles(0, orientationY, orientationZ)
            Icespike1:PivotTo(moveCFrame)
            task.wait(0.01)
        end
    end
end
#

BRO WHY CANT I SEND NORMAL VIDEOS 😭

true ocean
#

make it a mp4 file

#

roblox saves stuff in mkv for some reason

#

they really need to update their screen recorders ngl

severe dome
#

oh

#

give me a sec then

lilac hatchBOT
#

studio** You are now Level 8! **studio