Tweening issues?

You can write your topic however you want, but you need to answer these questions:
So I am working on a script that shoots a blast at the mouse position, m being the position I also need it to go a bit further then the mouse position, just in that general direction

The issue is it goes to the position, but it rotates, which i need it to keep its current rotation that it has before tweening

	local tweeninfo = TweenInfo.new(0.6, Enum.EasingStyle.Linear, Enum.EasingDirection.In)

	ts:Create(blast, tweeninfo, {CFrame = CFrame.new(m)}):Play()


1 Like

Since you are tweening a CFrame, that includes both position AND orientation. Instead, you need to tween the object’s position so it won’t rotate as the tween executes. Hope this helps!

1 Like
local blast = script.Parent
local ts = game:GetService("TweenService")
local tweeninfo = TweenInfo.new(0.6, Enum.EasingStyle.Linear, Enum.EasingDirection.In)
local tween = ts:Create(blast, tweeninfo, {Position = Vector3.new()})
tween:Play()

As the above poster suggested because you’re using a CFrame value (which incorporates rotational information about a worldspace point) the tweened part has its orientation changed. To remedy this just tween the Position property of the part instead by specifying some Vector3 value.

1 Like