-
I want to tweenservice the rotation, and move time at the same exact time, but with different "TweenInfo.new(10) for example, so if I make the move 1 second, then TweenInfo.new(10) won’t rotate 360 degrees extremely fast, I wanna have different types of TweenInfo.new(numbers) all in 1 script, 1 line so I can rotate the mask through different types of areas in the script
-
The tweenservice either doesn’t work if I coroutine it, or it doesn’t play at all… If I have it all in 1 line, like position, and cframe "TweenInfo.new(1) then if the rotation is 360, it’ll spin extremely fast, and not smooth at all.
-
I’ve tried coroutine, I’ve tried playing it by just “Play()” it seems to work with size, and transparency with coroutine, but if I even try rotating and moving it won’t work
Code: (Normal Tweenservice) My original code… I got 2 scripts I’m trying to demonstrate, thank you.
--- Configurations
local TweenService = game:GetService("TweenService")
local rotationInfo = TweenInfo.new(3,Enum.EasingStyle.Linear,Enum.EasingDirection.InOut, 0, false, 0)
local stageFunctions = script.Parent.Parent.Parent
local Face = stageFunctions.Face.Handle
while true do
--Start of the loop of everything dark, and no flamethrowers, or lights
wait(4) ---stays still for 25 seconds
--End of start, of the loop of everything dark, and no flamethrowers, or lights
--Function, Forward/back mask pop out, left, forward/back, right---------------------------------------------------------------------------------------------------------
local movingFace = TweenService:Create(Face, rotationInfo, TweenInfo.new(10), { CFrame = Face.CFrame + Vector3.new(0, 0, 1)})
movingFace:Play()
local rotatingFace = TweenService:Create(Face, rotationInfo, TweenInfo.new(10), { CFrame = Face.CFrame * CFrame.fromEulerAnglesXYZ(0, 0, 0.9)}) ---rotates right
rotatingFace:Play()
--End of Function, Forward/back mask pop out, left, forward/back, right-----------------------------------------------------------------------------
for _, part in ipairs(stageFunctions.StageLightPack.TowerLight:GetDescendants()) do
if part:IsA("SpotLight") then part.Enabled = true end
end
end```
Code: (V) "Coroutine"
```local TweenService = game:GetService("TweenService")
local Face = script.Parent
local rotationInfo = TweenInfo.new(3,Enum.EasingStyle.Linear,Enum.EasingDirection.InOut, 0, false, 0)
local Tween1 = TweenService:Create(Face, rotationInfo, TweenInfo.new(10), { CFrame = Face.CFrame + Vector3.new(0, 0, 1)})
local Tween2 = TweenService:Create(Face, rotationInfo, TweenInfo.new(10), { CFrame = Face.CFrame * CFrame.fromEulerAnglesXYZ(0, 0, 0.9)})
coroutine.wrap(function()
Tween1:Play()
end)()
Tween2:Play()