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

How do you trigger a "cutscene" with a click detector?

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.

1 comment

0

What I meant by "I think I can figure it out by myself but if not I'll just ask for help again." is that I think I can figure out the rest only if I get an explonation .

1 answer

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.

6 comments

1

Oh wow, thank you for explaning it so well jundell! I'll try my best to figure out how to script it with this knowledge.

0

No problem :) I would make you a simple script to guide you but I’m currently on mobile.

0

It's fine. But if you could mabye later give an example on how to use this code. I'm currently trying to figure it out by going to DevHub and youtube but none explain how to use 'em.

0

When I get on my computer, I can help you. I’m more likely to respond on discord, if want you can add me: vroom#9330

0

I’ll be on my computer in no more than 2 hours.

0

I sent you a friend request. Qweatak#3416

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