Tween works in Studio but not in the game (server-sided tween)

Hello everyone, I need help, I’d like to fix the bug that doesn’t allow the Tweens to happen in the game, whereas they work perfectly in Roblox Studio

The tween is working as expected in a studio play test mode, studio server test mode and even on a local client test, everything works perfectly in studio no matter how it’s tested,
but if i go in the actual game(experience) on Roblox, the tween just won’t work. In the first system the rockets will get stuck in the air and then explode. They remain stuck because of the Tween that does not work.

In the second system the helicopter just won’t start flying as its expected to, it’s the exact same problem as the previous rocket system.
At this point they both just get stuck at some weird position.
NOTE: Also the sound effects I am playing right before the rocket falls will play delayed or won’t play in the game (everything works fine in studio)
What solutions have you tried so far?

  • If I put all these effects into a local script then it will all work perfectly in the game just like it does in studio
  • I’ve searched for posts where tween service works in studio but not in the game but just seen that they all were unanswered or unsolved.

first system which is rocket rain will start like this:
https://gyazo.com/b3d54393e17664f1e4babf173e5dbae2

how the rocket rain system works in studio:
https://gyazo.com/18061c2a3b89784af69c0f82741dd292

how it works in the roblox game(it’s literally the same thing as shown in the previous video, but in the game, not studio):
https://gyazo.com/3d81f9298e7df80d94bbfdbb0dfc92ce

focus on the top right corner in this video and notice how the rocket just floats a few seconds and explodes(it’s stuck, because of the tween that doesn’t work as intended):
https://gyazo.com/3ff376b3577569f0e4ebff3319e23023

The issue also appears in my other system that is supposed to represent a helicopter, as I mentioned earlier:
https://gyazo.com/d3de706b85ae2ff1163ea0f1c710cc7a --This is how the helicopter should be flying (Studio footage) (the transparent block is considered as the helicopter)

How it looks in the roblox game:
https://gyazo.com/9b2baeca59a3fe4584e1476970ff8657

NOTE: However if I put all these tweenservice scripts into a localscript it will do the effect without bugging in the game, but the thing is I have never had a problem like this before, even though I’ve used tweens in server scripts quite often in the past.

code for the helicopter since they both work similar I added one of the codes:

local ts = game:GetService("TweenService")
local info = TweenInfo.new(0.1, Enum.EasingStyle.Linear)
local CircularOrigin = workspace.RaiderHelicopterOrigin

local PrimaryPart = script.Parent.PrimaryPart

coroutine.wrap(function()
	while wait() do
for i = 1, 100 do

local CircleAngle = i * 2 * math.pi / 100


local positionOnCircle = Vector3.new(math.sin(CircleAngle), 0, math.cos(CircleAngle))
			local part = Instance.new("Part", workspace)
			part.Anchored = true
			part.CanCollide = false
			part.Size = Vector3.new(3,3,3)
			part.Transparency = 0.8
			part.Position = CircularOrigin.Position + positionOnCircle * 50 + Vector3.new(0,50,0)
			game.Debris:AddItem(part, 1)
	ts:Create(PrimaryPart, info, {Position = CircularOrigin.Position + positionOnCircle * 50 + Vector3.new(0,50,0), CFrame = CFrame.new(PrimaryPart.Position, CircularOrigin.Position+Vector3.new(0,50,0))}):Play()
	task.wait(0.1)
	
	

		end
		end
end)()

NOTE:
For anyone wondering, +Vector3.new(0,50,0) stands for the helicopter to spin 50 studs above the origin part since the origin part is on the ground

2 Likes

The issue has yet not been solved… I’ve never encountered any problem like this before.
It really does not make sense, I have no idea why it would only work in Roblox Studio, but not in the game.