Problem with Tweening a model

I need to move and rotate a model with TweenService and I use Weld Constraints to do it.
The problem is that the game I am working on (a ship game) when cloning the ship the Current Client sees the ship completely broken and the Server sees it as it should be and when checking the Weld Constraints they are deactivated.
In both it moves.
Can anyone tell me how to fix it?
I attach some images so that it is better understood

Current Client

Server

Well did you make sure that you made the constraints on the server?

1 Like

Yes, I made it in a script parented in ServiceScriptService, in the script I don’t use any variable of a player.

Well maybe showing scripts would be better than showing images

1 Like

How about having the client handle the welding instead of the server? If the client handles it, it could probably boost performance up and the server wont have to deal with the stress of rendering the parts? (Also render the ship on the client only maybe?)

Though I might be overshooting it :man_shrugging: And you can just handle events/certain things like the ship breaking on the server of course. And client handles effects.

2 Likes

Here is the script: Is in ServerScriptService

local randMap = maps[math.random(1,#maps)]
print(randMap)
local ChoosenMap = randMap:Clone()
ChoosenMap.Parent = workspace

 local TweenService = game:GetService("TweenService")

local Ship = ChoosenMap
local ShipRoot = Ship.PrimaryPart

local tweenInfo = TweenInfo.new(
	50,
	Enum.EasingStyle.Linear,
	Enum.EasingDirection.InOut,
	0,
	false,
	0
)

local goals = {
	CFrame = ShipRoot.CFrame * CFrame.Angles(0,0,math.rad(-90)) * CFrame.new(150,0,0)
}

local tween = TweenService:Create(ShipRoot,tweenInfo,goals)

tween:Play()

wait(50)

local tweenInfo2 = TweenInfo.new(
	10,
	Enum.EasingStyle.Linear,
	Enum.EasingDirection.InOut,
	0,
	false,
	0
)

local goals2 = {
	CFrame = ShipRoot.CFrame * CFrame.new(75,0,0)
}	

local tween2 = TweenService:Create(ShipRoot,tweenInfo2,goals2)
tween2:Play()
wait(10)