Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

why script doesnt change the camera position?

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

2 comments

1

You have to use a LocalScript when manipulating the camera.

0

You should also put the camera as scriptable before you change the camera subject

1 answer

✓ Accepted answer

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

This discussion is preserved as it was. New answers, comments, and votes are closed.