Ok, so. I haven't scripted alot but I am trying my best to learn scripting. I am a solo dev and I am making a game but I have no idea on how to script.
I made this script with help from another user it's not done but I don't know how to finish it.
local clickDetector = workspace.DoorBell.ClickDetector
function onMouseClick() workspace.CameraPart end
clickDetector.MouseClick:Connect(function(onMouseClick)
I want it so that when you click the door Bell you see the POV of a camera part for around 5-7 seconds. I'm sorry if it seems like I'm only trying to get scripts for free. I'd be greatfull if someone could just explain atleast how camera parts and click detectors work and also if I need to use any remote events or if I have to use any code like "WaitForChild" for my script to work for example. I think I can figure it out by myself but if not I'll just ask for help again.
Make sure you are using a LocalScript. You can set workspace.CurrentCamera’s CameraType to Scriptable and its CFrame to workspace.CameraPart.CFrame. If you literally means “5-7 seconds” then you can do task.wait(math.random(5, 7)), or just task.wait(6) for a 6 second wait. To fix the camera, set the CameraType back to Custom.