Make an object quickly go to the right position while it spins

Hi, I’m trying to make a projectile that charges before being launched, however, the object that I have is meant to spin while charging. The issue is that I’m using TweenService to keep the object in the correct position but if I want to increase the the tween speed then it stops spinning.

I have connections later so the while is so that they don’t interfere.
This is what the issue looks like:

connection = RunService.Heartbeat:Connect(function()

	Tweening = true
	
	
TweenService:Create(Target,TweenInfo.new(0.05, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut),{CFrame = arg[4].CFrame}):Play()
	
TweenService:Create(Sphere,TweenInfo.new(0.05, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut),{CFrame = Target.CFrame * CFrame.new(-2,-0.05,-0.3)}):Play()
	
TweenService:Create(Neon,TweenInfo.new(0.05, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut),{CFrame = Target.CFrame * CFrame.new(-2,-0.05,-0.3)}):Play()
	
	if Tweening == true then
		task.delay(0.2, function()
			Tweening = false
			end)
		end
	
    while Tweening == true do
		Outeredge.CFrame = Outeredge.CFrame * CFrame.Angles(0, math.rad(5),0)
		TweenService:Create(Outeredge,TweenInfo.new(0.05, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut),{CFrame = Target.CFrame * CFrame.new(-2,-0.05,-0.3)}):Play()  - if the tween info is 0 it doesn't spin

		task.wait()
		Outeredge.CFrame = Outeredge.CFrame
	end

end)

I noticed before that tweeninfo seems to impact the spinning so I tried to create a coroutine with a tween that did basically nothing, from every where i’ve checked there hasn’t been any answer ti this issue. I’m also quite new to programming so that makes this even more confusing

Nevermind, I didn’t know that Cframes always include orientation. now I could just use positions instead

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