-
This script will set the camera cframe to a part, and when I use another script it will set the cframe to a player.
-
The script makes it impossible to manipulate the camera.
-
Deleting the script fixed the problem, but I need it to set my cframe to the part.
local RunService = game:GetService("RunService")
repeat wait()
Camera.CameraType = Enum.CameraType.Scriptable
Camera.CFrame = workspace.LoadingPart.CFrame
until Camera.CameraType == Enum.CameraType.Scriptable
script:Destroy()
because as soon as you make it scriptable it deletes the script?
please tell me if I misunderstood what your trying to say
After I make it scriptable I have no use for the script but that shouldn’t stop my other script from making it custom and making the cframe my player
Is there anything else that my be effecting this because I tested this and it made my camera go back to me perfectly fine
It has to be it, because when I remove it the camera works perfectly fine
So your saying you don’t want to have to delete the script?
I tested it with a script like this:
local Camera = game.Workspace.CurrentCamera
repeat wait()
Camera.CameraType = Enum.CameraType.Scriptable ---Makes it scriptable
Camera.CFrame = workspace.LoadingPart.CFrame
until Camera.CameraType == Enum.CameraType.Scriptable --now it deletes the script because its scriptabe
script:Destroy()
and one like this:
local Camera = game.Workspace.CurrentCamera
task.wait(10)
Camera.CameraType =Enum.CameraType.Custom
and my camera went to the part and then came back 10 seconds later
Is the script working by the way ?