How could I make a camera script?

So I have this script

	while wait(1) do

		local currentTime = os.time()

		if currentTime >= 1608343973 then


		if currentTime >= 1608343990 then
			--Camera Script--

How could I make it so when this script runs

if currentTime >= 1608343990 then

then your camera (EVERYONE’s CAMERA) goes to a part.
then you wait 5 seconds and it goes back to normal.


Emm… what u doing in there? Why using currentTime >= 1608343973 ?
That time already happened and its not gonna happen again, I mean, I really dont understand. Thats gonna be true forever, why add it?
You want that the camera and stuff happens at certain day, certain hour and minute? and never happens again? or always happens after reaching that date? I really dont get it

1 Like

Camera manipulation should be done in a Localscript. What you can do is fire a remote event to all clients and have a LocalScript in StarterPlayers to manipulate it when it’s called.

You can check out how to manipulate a users camera here:

Could you provide some context as to what this script does? I find it pretty confusing and I don’t understand why you have hard-coded times set out that will only happen once. Some context would be great so we can get to working on your camera script.

im tryna make a live event so when the year 2021 comes it would be fun i thought. so I wanted to make that.and the numbers are the time . just tests.

1 Like

for everyone confused of what Im trying to do is, I’m making a live event for the year 2021, so when it becomes year 2021 (in real time) your camera moves to a part. (I’m still coming up with ideas) idk if I’m doing this right but if u could tell me how to make it so when its the year 2021 something happens. Idk if my script is really right.

You need to fire a remote event to all the clients. The camera can only be changed there. What you should then do (on the client after the remote signal) is change the camera type to Enum.CameraType.Fixed and set the CameraSubject to your part. You can then send another signal from the server that sets the CameraType back to Enum.CameraType.Customizable (I think that’s the correct one, I would recommend double checking the API).