#How would I incorporate acceleration and deceleration into a spin script?

4 messages · Page 1 of 1 (latest)

vernal thunder
#

This is the script I am currently using

local laserModel = script.Parent
    local runService = game:GetService("RunService")
    local rotationSpeed = math.rad(45)
    
    runService.Heartbeat:Connect(function(deltaTime)
        local currentCFrame = laserModel:GetPivot()
        local newCFrame = currentCFrame * CFrame.Angles(0, rotationSpeed * deltaTime, 0)
        laserModel:PivotTo(newCFrame)
end)

I also want the accel/decell to be controllable by a tween

slow cometBOT
#

studio** You are now Level 11! **studio

vernal thunder
#

I just have no clue

peak yew
#

tween the rotation speed