Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 3 years 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 = TweenInfo.new(5, 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?

0
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 1049 — 3y
0
How do I get when all the clients are fired? Benbebop noah01q 5 — 3y
0
use the .OnClientEvent attribute. "RemoteEvent.OnClientEvent:Connect()" Benbebop 1049 — 3y

Answer this question