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.

GroupId = 3348123

script.Parent.ClickDetector.MouseButton1Click:connect(function(p)
    if p:GetRankInGroup(3348123) ==255 then
    if script.Parent.Transparency == 0 then
        script.Parent.Transparency = 1
    script.Parent.CanCollide = false
    else
    script.Parent.Transparency = 0
    script.Parent.CanCollide = true
    end
    else

    end
end)

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