Hi! I'm making a camera script so I can learn how to use it but I have ended with a problem that the camera isn't changing its position. Please help!
Script in ServerScriptService:
local replicatedStorage = game:GetService("ReplicatedStorage")
local remoteEvent = replicatedStorage:WaitForChild("ChangeCamera")
local function onCharacterAdded(Player,Char)
remoteEvent:FireClient(Player,Char)
end
local function onPlayerAdded(Player)
Player.CharacterAdded:Connect(function(Char)
onCharacterAdded(Player, Char)
end)
end
game.Players.PlayerAdded:Connect(onPlayerAdded)
Script in LocalScript:
local replicatedStorage = game:GetService("ReplicatedStorage")
local remoteEvent = replicatedStorage:WaitForChild("ChangeCamera")
local function cameraChange(Player, Char)
local cam = workspace.CurrentCamera
cam.CameraType = Enum.CameraType.Scriptable
local campos = game.Workspace.CameraPart.Position
local focuspartpos = game.Workspace.FocusPart.Position
print(campos)
print(focuspartpos)
local camCFrame = CFrame.new(campos, focuspartpos)
cam.CFrame = camCFrame
end
remoteEvent.OnClientEvent:Connect(cameraChange)

4 comments
I meant LocalScript in StarterPlayerScripts btw sorry
You don't need remote events to modify the camera, the players client has access to it. But other than that the code looks fine, are your prints firing and it just not moving, or does that whole code not fire?
the prints are firing but the camera did noot change cframe
Im looking into it right now. I tested your code and got an error I've never seen before, so I googled it. Roblox introduced a new car camera system a few weeks ago, and since then this error message has been spamming peoples games since, and Roblox said they won't look into it until after the holidays. If I can find something out, or fix your code, i'll post back.