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

Camera going through a transparent part. How would I make this not happen?

Asked by
ghxstlvty 133
4 years ago

Salutations. I am working on my event center. I don't want trainees or guests zooming their camera through the transparent wall and pressing buttons that only HRs get access to. I tried doing stuff with Popper cam and looked up tons of stuff about this and cannot seem to find anything that works.

https://prnt.sc/r9mti5 <-- There are the buttons that I don't want other people besides HRs pressing. There is an invisible wall before you get on the stage that only lets HRs+ in.

Please, do not get angered at the face I am "requesting" something. This is just the fact I have been trying to figure this out for a while and I am angered with the fact nothing has helped.

0
What you could do is make sure that the people pressing it are on the HR team, and otherwise it would not do anything doomblade_66 55 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago

It's not the best code but I think it's good enough.

local ClickDetector = script.Parent.ClickDetector --Add a clickdetector to your part and parent it.
local Brick = script.Parent.Parent.Part --Parent everything you need. (Lights, Parts and more).

ClickDetector.MouseClick:Connect(function (player)
    if player:GetRankInGroup(5367465) >= 30 then --Enter your groupid and the rankid+ who is allowed to use the buttons.
        Brick.Transparency = 1 --Add everything that should happen when someone hits the button.
    end
end)
0
The thing is, is that these buttons open and close a door. The door has an actual animation that opens are closes and is not just transparency. ghxstlvty 133 — 4y
0
Nvm! I figured it out myself. Thankss!!! ghxstlvty 133 — 4y
0
Welp. It doesn't work, ghxstlvty 133 — 4y
0
Hm. May you tell me what's wrong? DeAuroraxx 50 — 4y
Ad

Answer this question