So I’m currently making a loading screen for a game, and the background of it is like a camera. I used a tutorial on this, but I am trying to edit it to what I need it to do. Basically, I am trying to make it so when you press a play button, it resets the player’s camera back to normal. This is the part I’m unsure how to do.
local cc = workspace.CurrentCamera
local CameraPart = workspace.CameraPart
wait(.001)
cc.CameraType = Enum.CameraType.Scriptable
cc.CFrame = CameraPart.CFrame
local function PlayButtonClicked ()
--not sure how to reset the players camera here
end
script.Parent.MouseButton1Click:Connect(PlayButtonClicked)
Im sorry but, please dont respond just for the sake of responding.
Here is the proper way of doing so:
local cc = workspace.CurrentCamera
local CameraPart = workspace.CameraPart
wait(.001)
cc.CameraType = Enum.CameraType.Scriptable
cc.CFrame = CameraPart.CFrame
local function PlayButtonClicked ()
cc.CameraType = Enum.CameraType.Custom
end
script.Parent.MouseButton1Click:Connect(PlayButtonClicked)
cc.CameraType = Enum.CameraType.Custom will reset the camera back to the default.
there isnt a point to set the camerasubject. As it’ll already stay since it isnt changed in the script. only cc.CameraType = Enum.CameraType.Custom is needed.
You said Enum.CameraType.Default which doesn’t exist.
if you don’t know then don’t respond. It really seems like you’re post farming. Thats the same as applying to a construction job without knowing how to do basic construction.