Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I destroy Camera when pressed button?

Asked by 5 years ago

I made a cutscene that shows up the Play button GUI, which allows people to play in but however, when pressed, nothing happens. Here is my code. But however, I never tried the Left Click instances before.

1local Camera = game.Workspace.Camera
2local Play = script.Parent
3 
4function MouseButton1Click(plr):Connect
5    if MouseButton1Click Play then
6        game.Workspace.Camera:Destroy()
7    end
8end

Please note that it didn't use any ClickDetection.

0
well if you want to detect mouse button 1 click then you could use mybituploads 304 — 5y
0
local mouse = game.Players.LocalPlayer:GetMouse() mybituploads 304 — 5y
0
mouse.Button1Down:Connect(function() mybituploads 304 — 5y
0
CODE mybituploads 304 — 5y
View all comments (2 more)
0
end) mybituploads 304 — 5y
0
^^ Put that into an answer so it can be accepted. superawesome113 112 — 5y

Answer this question