Hello! I am developing an FPS set in WW1, and I am making the starting UI at the moment. When the player joins, I want them to see this UI, but have a blurred view of the map from the top down behind the GUI. I have this scripted, and I cannot figure out how to get it to work, as when my character spawns, the camera is just set to my character.
My code:
local camera = game.Workspace.CurrentCamera
camera.CameraType = Enum.CameraType.Scriptable
camera.CFrame = game.ReplicatedStorage.SkyView.Value
This does not work. Would I have to put this in a CharacterAdded event instead?
Edit: game.ReplicatedStorage.SkyView is a CFrameValue with a value of the camera’s CFrame pointing down at the map below.
local replicated = game:GetService("ReplicatedStorage")
local skyview = replicated:WaitForChild("SkyView")
local camera = workspace.CurrentCamera
camera.CameraType = Enum.CameraType.Scriptable
camera.CFrame = skyview.Value
Should be as simple as a local script inside the StarterCharacterScripts folder, providing the “SkyView” instance is indeed a “CFrameValue” instance and its “Value” property correctly stores/holds a CFrame value.
local replicated = game:GetService("ReplicatedStorage")
local skyview = replicated:WaitForChild("SkyView")
local camera = workspace.CurrentCamera
repeat
task.wait()
camera.CameraType = Enum.CameraType.Scriptable
until camera.CameraType == Enum.CameraType.Scriptable
camera.CFrame = skyview.Value
Waiting for the camera type to change may do the trick.