Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How can you enable and disabe Camera Manipulation?

I need help on getting a local script that enables a certain camera manipulation and then disables after a certain time. Can someone help me with it since it doesn't work. I tried to clone the camera local script from ReplicatedStorage to StarterGui then destroys the script so that the camera stops, but it didn't work why?

game.ReplicatedStorage.Camera:Clone().Parent = 
game.StarterGui
wait(15)
game.StarterGui.Camera:Destroy()

2 comments

0

Why do you clone it into the starter gui? That won't do anything. It just parents a camera to the startergui. You should be setting the properties of workspace.CurrentCamera.

0

How do i do that?

2 answers

Why parent a camera to starter gui? CurrentCamera is the best way, because you'd be configuring the options for the player's camera.

local Camera = workspace.CurrentCamera
-- If you want just the localplayer's camera to change, configure the camera using a localscript.
Camera.CameraType = "Custom" -- You'll need more understanding to use the camera types.

You could use CameraSubject to change the cameras primary focus part. It's some cool stuff.

2 comments

0

Use Enum pls

0

Im also guessing he means scriptable camera o.o

Heres how I did it

local camera=game.Workspace.Camera
local cameraposition=script.Parent.PartPos --This is for the position of the camera

repeat Camera.CameraType=Enum.CameraType.Scriptable untilCamera.CameraType==Enum.CameraType.Scriptable -- I know this looks extreme but it ensures that the cameratype changes properly
repeat Camera.CFrame=cameraposition.CFrame until Camera.CFrame==cameraposition.CFrame

Tell me if you find a better solution

This discussion is preserved as it was. New answers, comments, and votes are closed.