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

[Error fixing] Code for privacy glass not working?

Asked by 6 years ago

Hello everyone! Im trying to make a privacy glass code that when clicked it will change the transparancy. But it doesn't seem to be working! What can i do?

01game.Workspace.pgoeclickdetect.OnServerEvent:Connect(function()
02 
03    pe = false
04    privacyone = game.Workspace.privacyglassone
05 
06    print("pe info stored")
07 
08    if privacyone.Transparency == 0.55 then
09        pe = true
10 
11 
12    elseif privacyone.Transparency == 0 then
13        pe = false
14 
15    end
View all 26 lines...
0
Is "pgoeclickdetect" a ClickDetector or RemoteEvent? OnServerEvent is an event used for RemoteEvents. xPolarium 1388 — 6y
0
If it is a click detector then you do not need a remote event. User#21908 42 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago

In this case use ClickDetectors instead of RemoteEvent

Ad

Answer this question