I try to do this but it don't work people still can click it and no script errors comes up
game.Players.PlayerAdded:connect(function(plr) if plr:GetRankInGroup(2752658) >= 175 then script.Parent.ClickDetector.MouseClick:connect(onClicked) end end)
This is just a script inside of a button in a ScreenGui in StarterGui, if you move the button you'll have to change the amount of parents on "plr", there's probably another way to do it but that's how I do it.
local plr = script.Parent.Parent.Parent.Parent script.Parent.MouseButton1Click:connect(function() if plr:GetRankInGroup(2752658) >= 175 then --your code here end end)
Closed as Too Broad by Uroxus, ChemicalHex, TheHospitalDev, and M39a9am3R
This question has been closed because it is too broad and is generally unanswerable. Please ask a more specific question.
Why was this question closed?