Hello! I was wondering why this script will not work. It should check that the player has the correct requirements in order to proceed onto the next stage. Would I have to wait for the child, find the first child, create an in pairs loop of will it be something else?
ReqAge = 20 GroupID = 000000 script.Parent.Parent.BEGIN.MouseButton1Click:connect(function(player) if player ~= nil then if player.AccountAge < ReqAge then player:Kick("You Must Be Atleast 20 Days Old To Apply!") if player:IsInGroup(GroupID) == nil then player:Kick("You Have Join The Group!") if player:IsInGroup(GroupID) and player:GetRankInGroup(GroupID) == 2 then player:Kick("You Have Been Suspended") else script.Parent.Parent.Parent.STAGE1.Visible = false end end end end end)
Thanks.
ReqAge = 20 GroupID = 000000 script.Parent.Parent.BEGIN.MouseButton1Click:connect(function(player) if player ~= nil then local rank = player:GetRankInGroup(GroupID) if player.AccountAge < ReqAge then player:Kick("You Must Be Atleast 20 Days Old To Apply!") --elseif player:IsInGroup(GroupID) == nil then elseif rank == 0 then player:Kick("You Have to Join The Group!") --elseif player:IsInGroup(GroupID) and player:GetRankInGroup(GroupID) == 2 then elseif rank == 2 then player:Kick("You Have Been Suspended") else script.Parent.Parent.Parent.STAGE1.Visible = false end end end)
note that the rank will be 0 if not a member, so IsInGroup() is not strictly needed. (I commented out some lines and replaced them to demonstrate). Also note that using a rank to suspend people may not be a good idea as they can just leave the group and rejoin.