Log in to vote

Why can I not tween a players camera from a script?

Asked by 12 days ago

Hello everyone! When I try to tween a players camera from a localscript it works and if I do it from a script it does not. I am trying to make a button that makes all of the players camera to one so I was trying to use this script. local cam = game.Workspace.Camera local service = game:GetService("TweenService") local tweeninfo =, Enum.EasingStyle.Sine, Enum.EasingDirection.In, 1, true, 0) cam.CameraType = Enum.CameraType.Scriptable local tween = service:Create(cam, tweeninfo, {CFrame = game.Workspace.openwall.CFrame}) tween:Play() end)

Idk but can someone just tell me why?

You cant tween something that is not kept on the server from the server, such as player cameras. It absolutly has to be done from the client. You can try putting a RemoteEvent in ReplicatedStorage then firing all clients. Benbebop 949 — 12d
How do I get when all the clients are fired? Benbebop noah01q 0 — 12d
use the .OnClientEvent attribute. "RemoteEvent.OnClientEvent:Connect()" Benbebop 949 — 12d

Answer this question