Tweening models locally

Hello! I’m currently working on an elevator system, and I’d like to tween not only parts but a model. When I tried it on a ServerScript, it worked perfectly, thanks to tweening a PrimaryPart of the model. However, when I tried it on a LocalScript, it tweened just the PrimaryPart on its own but not the whole model. I’m trying to use LocalScript because I want the tweening to be client-sided.

ServerScript functioning:

LocalScript functioning:

Script: (Local)

local event = game:GetService("ReplicatedStorage").ChangeCamera
local player = game.Players.LocalPlayer
local camera = workspace.CurrentCamera
local CameraPoint = game.Workspace:WaitForChild("ElevatorPrompt").CameraPoint
local Door1 = workspace.Elevator.Door1.PrimaryPart
local Door2 = workspace.Elevator.Door2.PrimaryPart
local TweenService = game:GetService("TweenService")
local position1 = Vector3.new(-1.545, 4, -26.598)
local position2 = Vector3.new(-1.545, 4, -33.11)
local position3 = Vector3.new(-1.545, 4, -28.598)
local position4 = Vector3.new(-1.545, 4, -31.11)
local tween1 = TweenService:Create(Door1, TweenInfo.new(2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out, 0, false, 0), {Position = position1})
local tween2 = TweenService:Create(Door2, TweenInfo.new(2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out, 0, false, 0), {Position = position2})
local tween3 = TweenService:Create(Door1, TweenInfo.new(2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out, 0, false, 0), {Position = position3})
local tween4 = TweenService:Create(Door2, TweenInfo.new(2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out, 0, false, 0), {Position = position4})

event.OnClientEvent:Connect(function()
	camera.CameraType = Enum.CameraType.Scriptable
	camera.CFrame = CameraPoint.CFrame
	wait(1)
	tween1:Play()
	tween2:Play()
end)
1 Like

Put the model in ReplicatedStorage, clone it on client and parent it to workspace.

1 Like

When should I clone it? Like when the ProximityPrompt gets triggered?

This post I made might be of some use?