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

How do I manipulate camera with FE?

Asked by 5 years ago
Edited 5 years ago

I'm trying to make a camera manipulation script for a cut-scene intro, and I'm new to FE and I cant get my script to work. It works perfectly in studio but now in the real game. I have a local script in StarterPlayerScripts which is this

camera = game.Workspace.CurrentCamera

game.ReplicatedStorage.camera.camera1.OnServerEvent:Connect(function()
    local target = game.Workspace.Cameras.cam1
    camera.CameraType = Enum.CameraType.Scriptable 
camera.CameraSubject = target
    camera.CoordinateFrame = CFrame.new(target.Position)  
                           * CFrame.Angles(0, 6.25, 0) 
                           * CFrame.new(0, 0, 0)       

end)
game.ReplicatedStorage.camera.camera3.OnServerEvent:Connect(function()
    local target = game.Workspace.Cameras.cam3
    camera.CameraType = Enum.CameraType.Scriptable 
camera.CameraSubject = target
    camera.CoordinateFrame = CFrame.new(target.Position)  
                           * CFrame.Angles(0, 6.25, 0) 
                           * CFrame.new(0, 0, 0)       

end)

And a main script which fires the remote events also in StarterPlayerScripts

camera = game.ReplicatedStorage.camera
wait(2)
camera.camera1:FireServer()
wait(3)
camera.camera2:FireServer()

can someone please help with this? I've been stuck with this for a while with no result!

0
I always thought Camera was a client object... ScrewDeath 153 — 5y
0
I tried client and I produced an error in the game ryan0087 0 — 5y
0
For now, add prints and see if the script is actually running, tbh. What is the error you're getting anyways? ScrewDeath 153 — 5y
0
I must have done something wrong, because I changed it back to client and there is no errors but nothing is happening! ryan0087 0 — 5y
View all comments (2 more)
0
What does your client script look like and is it running at all (prints)? ScrewDeath 153 — 5y
0
No it is not printing... ryan0087 0 — 5y

Answer this question