I have made a tween that opens a a gate by moving it upwards. The gate it a model with 5 different parts. I am not sure why but it is only moving one part of the Gate even though I have set PrimaryPart of the model and used WeldConstraints for every seperate part to connect to the Main part which is in the center.
Below is a screenshot of the Model in workspace (Yes I have checked that the WeldConstraints are from that part to the Main Part.
This is the code inside of a script in ServerScriptService:
--variables
local tweenService = game:GetService("TweenService")
local door = game.Workspace.Gate
local wps = game:GetService("Workspace")
--tweens
local doorTween = TweenInfo.new(
3,
Enum.EasingStyle.Linear,
Enum.EasingDirection.In,
0,
false,
0
)
--tween
local openDoor = tweenService:Create(door,doorTween, {CFrame = game.Workspace.GatePos.CFrame})
--functions
function noobWalk ()
openDoor()
end
wait (5) -- main game begin
noobWalk() -- call function for the tween
Many thanks,
u_fep