local set = TweenInfo.new(1.5,
Enum.EasingStyle.Quart,
Enum.EasingDirection.InOut,
0,
false,
0
)
local target = {CFrame = workspace.BlackMarketCam.CFrame}
local tweenStart = TweenService:Create(cc, set, target)
tweenStart:Play()
How can I do the opposite of the code that I just did. This might feel stupid to say but I don’t know how to, because whatever code I attempt to achieve this there will be a error saying Unable to cast to dictionary.
local startPos = workspace.BlackMarketCam.CFrame
local set = TweenInfo.new(1.5,
Enum.EasingStyle.Quart,
Enum.EasingDirection.InOut,
0,
false,
0
)
local target = {CFrame = workspace.BlackMarketCam.CFrame}
local tweenStart = TweenService:Create(cc, set, target)
tweenStart:Play()
-- wait to do whatever
local set = TweenInfo.new(1.5,
Enum.EasingStyle.Quart,
Enum.EasingDirection.InOut,
0,
false,
0
)
local target = {CFrame = startPos}
local tweenStart = TweenService:Create(cc, set, target)
tweenStart:Play()
In your TweenInfo, there is an argument which makes the tween reverse back to its original spot on completion. Maybe replace the false boolean in the TweenInfo with true
I believe he is trying to make a shop, so I implemented the pause if the player needs to have their camera facing the shop, then once they are done, move back.
this is the code, i swapped around the target and cc because I want target (which is the BlackMarketCamera) to the current camera of the player. That is the issue