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

why script doesnt change the camera position?

Asked by 4 years ago

i'm trying to make a script that spawns a vehicle and then positions the camera on it but it isnt working, i think its because i'm using a server script.

game.ReplicatedStorage.Eventos.Defender.OnServerEvent:Connect(function(plr)
local defender = game.ServerStorage.Defender
    local oi = defender:clone()
    local cam = oi.camera
    oi.Parent = game.Workspace
    Camera.CameraSubject = cam
    Camera.CameraType = "Scriptable"

end)

i'm using a server script because i'm new on the area and dont know how im going to make the script change the camera on the correct model

1
You have to use a LocalScript when manipulating the camera. youtubemasterWOW 2741 — 4y
0
You should also put the camera as scriptable before you change the camera subject Cynical_Innovation 595 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago

Issue 1: Can only change camera pos in LocalScripts Issue 2: Use workspace.CurrentCamera Issue 3: Change CameraType before changing CameraSubject

Ad

Answer this question