Hi there! I want to make a camera security system, but I don’t know what I need to use. I want it to be like that you have a GUI. You have two buttons (a left and right button) and with that buttons you can switch cameras. I know how to do most of the part but I was wondering how I could make it that you have multiple cameras in a folder and you can order them on numbers.
Thanks for reading and I hope someone can help me out
Loop through the folder. Create buttons for every camera. Switch the camera’s position to the part(s).
Note part names exist, you can name them and use their names if you wish.
Thanks for reacting! But I just found a way with ToNumber, isn’t that easier then creating a button for every camera?
Depending on what camera system you want, there are two:
- Directly on the screen (by changing the character’s Camera)
- On a surface, like a computer brick (using ViewPort frame)
If you choose to do the surface, then take a look at this open-sourced camera system.
I want it directly on the screen.
ToNumber turns a string (“1”) into a integer.
I just read part of your message, I realized you want it to switch to the next number. Yes, do tonumber and add one to the number. tostring also exists, so that’ll work.
Okay, thanks I will try it with ToNumber.
An idea would be to count the number of cameras (#folder:GetChildren()
) and set the number to 1 if you hit the total number, or to #folder:GetChildren()
if you press back on 1.