#tweening (rotation) more than 360 degrees and tweening models

1 messages · Page 1 of 1 (latest)

lament blaze
#

Is it possible to tween a cframe more than 360 degrees?? and is it possible to tween models?
Chatgpt said you could and gave me instructions for it and I tried getting it to work for like 3 hours and then chat said it wasnt possible for either. so idk pls help

currently im just rotating a cframe in the model 180 deg and repeat is set to (NumberOfTotalSpins * 2) then I have another tween for the angle under 360deg that plays after that.

Currently trying to make a spinning wheel of fortune

snow summit
#

Model:PivotTo()

#

to rotate models

#
local TweenService = game:GetService("TweenService")

  local wheel = workspace.WheelModel
  local startPivot = wheel:GetPivot()

  local spins = 6
  local finalOffsetDeg = 37
  local totalDeg = spins * 360 + finalOffsetDeg

  local angle = Instance.new("NumberValue")
  angle.Value = 0

  local conn = angle:GetPropertyChangedSignal("Value"):Connect(function()
        -- negative for clockwise; remove minus for counter-clockwise
        wheel:PivotTo(startPivot * CFrame.Angles(0, math.rad(-angle.Value), 0))
  end)

  local tween = TweenService:Create(
        angle,
        TweenInfo.new(4, Enum.EasingStyle.Quint, Enum.EasingDirection.Out),
        { Value = totalDeg }
  )

  tween.Completed:Connect(function()
        conn:Disconnect()
        angle:Destroy()
  end)

  tween:Play()
lament blaze
#

THANK YOU