#I'm trying to do 2 CFrame operations (with tween) on 1 model
1 messages · Page 1 of 1 (latest)
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
that could work, though if you want to use tweens youll have to wait for the first one to finish before running the next one
https://create.roblox.com/docs/reference/engine/classes/Tween#Completed
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)
ill try thanks :p