How to run 2 different tweens on a block at the same time?

I am trying to create a part which tweens to where I click with my mouse while also changing the y axis with another different tween. When this script runs the part only tweens toward my mouse and does not change on the y axis. I am just learning tweens now so any tips would be appreciated as well.

local part =script.Parent
local tweens = game:GetService("TweenService")
local function fire(player, mousepos)
	local tweeninfo = TweenInfo.new(3, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out, 0, true, 0)
	local tweeninfo2 = TweenInfo.new(6, Enum.EasingStyle.Linear, Enum.EasingDirection.Out, 0, false, 0)
	local tween = tweens:Create(part, tweeninfo, {CFrame =CFrame.new(part.CFrame.X, part.CFrame.Y + 10, part.CFrame.Z)})
	local tween2 = tweens:Create(part, tweeninfo2, {CFrame =CFrame.new(mousepos.X, part.CFrame.Y, mousepos.Z})
	tween:Play()
	tween2:Play()
end
game.ReplicatedStorage.RemoteEvent.OnServerEvent:Connect(fire)
1 Like

You cant play two tweens on the same part unless they’re changing different properties. You can make one tween do both the things you’re trying to do, or do it with CFrames.

3 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.