My holo script isnt working. I changed :GetRoleInGroup() to :GetRankInGroup to fix that problem but i found that there is something wrong with how the onChat function is called at the end of the script but i dont know what it is. Here's the updated script:
groupid=1209141 rankmin=10 open=false hatchopen=false first={} success="Request completed" notfound="Unable to complete request//Map Not Found" notthere="Unable to complete request//Gamemode Does Not Exist" gamemodes="ffa, teammatch" maplist="hardobby, classic, paths" lobby=math.random(-30.5,14.5),42.5,math.random(-969,-980) function mode(mode,pr) if mode=="ffa" and open=true then teleport(arena) end end function success(per) local m=Instance.new("Message",per.Character) m.Text=success wait(1.5) m:Destroy() end function errr(err,pers) error(err) if err==notfound then local m=Instance.new("Message",pers.Character) m.Text=notfound wait(1.5) m.Text=("The current maps are:"..maplist) wait(2.5) m:Destroy() end if err==notthere then local m=Instance.new("Message",pers.Character) m.Text=notthere wait(1.5) m.Text=("The current gamemodes are:"..gamemodes) wait(2.5) m:Destroy() end end function loadmap(map,payer) local find=game.Workspace:FindFirstChild(map) if find~=nil then open=true find:Clone().Parent=game.Workspace.map wait(0.2) success(payer) end if find==nil then errr(notfound,payer) open=false end end function endmap(plr) local fd=game.Workspace.map:GetChildren() for i=1,#fd do end end function teleport(place) local plays=game.Players:GetPlayers() for i=1,#plays do plays[i].Torso.CFrame=CFrame.new(place) end end game.Players.ChildAdded:connect(function(player) function onChat(message,player) if message=="!end session" and player:GetRankInGroup(groupid)>=10 then local m=Instance.new("Message",game.Workspace) m.Text="Thank you for coming to "..first.."'s Training" game.Players:ClearAllChildren() end if message=="!start session" and player:GetRankInGroup(groupid)>=10 then teleport(lobby) end if message:sub(1,5)=="!load " and player:GetRankInGroup(groupid)>=10 then loadmap(message:sub(6),player) end if message:sub(1,4)=="!end " and player:GetRoleInGroup(groupid)>=10 then endmap(message:sub(5),player) end if message:sub(1,5)=="!mode " and player:GetRankInGroup(groupid)>=10 then mode(message:sub(6,player)) end end end) game.Players.PlayerAdded:connect(function(player) player.Chatted:connect(function(message) onChat(message,player) if player:GetRankInGroup(groupid)>=10 and #first<1 then table.insert(first,player.Name) print("You're an admin") end end) end)