#I'm trying to do 2 CFrame operations (with tween) on 1 model

1 messages · Page 1 of 1 (latest)

thorn grail
#

i want the animations to be at different intervals thats why they are separate

sour hearth
#

I wouldn't have used tween service, instead I would have used a runservice loop which sets the y position of the dropper to a sine wave and the rotation can be set in a similar way

frozen stag
sour hearth
#

like this

-- Services --
local RunService = game:GetService("RunService")

-- Variables --
local Dropper: Model = workspace.Dropper
local dropperOrigin = Dropper:GetPivot()

-- Functions --
local function UpdateDropper()
    local t = time()
    local newDropperPosition = dropperOrigin.Position + Vector3.new(0, math.sin(t), 0)
    local dropperAngle = t

    Dropper:PivotTo(CFrame.new(newDropperPosition) * CFrame.Angles(0, t, 0))
end

-- Connections --
RunService.RenderStepped:Connect(UpdateDropper)
thorn grail
#

ill try thanks :p