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

Why does it say MouseButton1Click is not a valid member of ClickDetector?

Asked by 7 years ago

When I test out my group owner only door; in the output it says MouseButton1Click is not a valid member of ClickDetector. I have no clue how to fix this.

01GroupId = 3348123
02 
03script.Parent.ClickDetector.MouseButton1Click:connect(function(p)
04    if p:GetRankInGroup(3348123) ==255 then
05    if script.Parent.Transparency == 0 then
06        script.Parent.Transparency = 1
07    script.Parent.CanCollide = false
08    else
09    script.Parent.Transparency = 0
10    script.Parent.CanCollide = true
11    end
12    else
13 
14    end
15end)

Please help me, thank you!

1 answer

Log in to vote
0
Answered by
aiuis 85
7 years ago
Edited 7 years ago

ClickDetectors doesn't have an event called MouseButton1Down. Replace it with MouseClick

http://wiki.roblox.com/index.php?title=API:Class/ClickDetector

Ad

Answer this question