Im trying to set the camera to scriptable but too no avail any reasons why its not working, ive tried methods that I know of still doesnt want to work
local function setCFrame(cframe)
repeat camera.CameraType = Enum.CameraType.Scriptable
until camera.CameraType == Enum.CameraType.Scriptable
camera.CFrame = cframe
end
setCFrame(game.Workspace.Dummy.Head.CFrame)
Its located in a local script and im defining the camera earlier in the code I just never showed it
local plr = game.Players.LocalPlayer
--- Camera
local camera = game.Workspace.CurrentCamera
--- UI Oriented Stuff
local Event = plr.PlayerGui:WaitForChild("Event")
local mainMenu = Event.mainMenu
--- main menu Buttons
local play = mainMenu.play
local settingz = mainMenu.settings
local Design = require(game.ReplicatedStorage.Design)
local Functions = Design.new()
Functions:Enter(play)
Functions:Enter(settingz)
Functions:AddBlur(camera)
local function setCFrame(cframe)
repeat camera.CameraType = Enum.CameraType.Scriptable
until camera.CameraType == Enum.CameraType.Scriptable
camera.CFrame = cframe
end
setCFrame(game.Workspace.Dummy.Head.CFrame)
It’s not obvious. The only thing that’s obvious is that you want the camera to be in a certain CFrame, but that doesn’t explain your use case at all. When do you want to release it? Do you want to update it? Do you want it to change at all after setting the CFrame?
local function setCFrame(cframe)
local c c = game:GetService("RunService").RenderStepped:Connect(function() camera.CFrame = cframe end)
return function() c:Disconnect() end
end
it goes through all the code inside of the function and prints out that it turned scriptable, problem is it just still doesnt want to ste the cframe of the camera, im not sure why because it printed that it was scriptable