generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Access GUI

Previous Thread :: Next Thread 
Ariaxs is not online. Ariaxs
Joined: 27 Feb 2012
Total Posts: 637
04 Jul 2014 09:28 PM
Trying to basically make a "Rank GUI" but by according to your rank it'll show you your access level to allow you to enter certain rooms.

Script its self:

groupid = 795844 --Insert group id here.
game.Players.PlayerAdded:connect(onPlayerRespawned)
function onPlayerRespawned(newPlayer)
wait(1)
if newPlayer:IsInGroup(groupid) then
textgroup = script.Parent.Text
textcolor = script.Parent.TextColor3
UnrefinedRank = newPlayer:GetRoleInGroup(groupid)
if UnrefinedRank >= 8 then
textgroup = "ACCESS LEVEL: RED"
textcolor = Color3.new(255,0,0)
if UnrefinedRank <= 7 then
textgroup = "ACCESS LEVEL: GREEN"
textcolor = Color3.new(0,255,0)

else
UnrefinedRank = "Visitor"
textgroup = "ACCESS LEVEL: NONE"
textcolor = Color3.new(255,255,255)
end
end
end
end


The output:

21:25:40.102 - Attempt to connect failed: Passed value is not a function
21:25:40.103 - Script 'Players.Player1.PlayerGui.ScreenGui.ACCESS.ACCESSLEVEL.Scri', Line 2
21:25:40.104 - Stack End
Report Abuse
swimguy777 is not online. swimguy777
Joined: 30 May 2009
Total Posts: 17092
04 Jul 2014 09:34 PM
Take this line:
game.Players.PlayerAdded:connect(onPlayerRespawned)

and put it at the very bottom of your script

-[::ƧѡÎḾḠΰῩ::]-[::Helper of Scripting and Writer of Wikis::]
Report Abuse
Ariaxs is not online. Ariaxs
Joined: 27 Feb 2012
Total Posts: 637
04 Jul 2014 09:36 PM
It still puts this.

21:35:21.151 - Attempt to connect failed: Passed value is not a function
21:35:21.151 - Script 'Players.Player1.PlayerGui.ScreenGui.ACCESS.ACCESSLEVEL.Scri', Line 2
21:35:21.152 - Stack End
Report Abuse
swimguy777 is not online. swimguy777
Joined: 30 May 2009
Total Posts: 17092
04 Jul 2014 10:58 PM
Do what I said earlier, but make sure to delete the one on line 2

-[::ƧѡÎḾḠΰῩ::]-[::Helper of Scripting and Writer of Wikis::]
Report Abuse
Ariaxs is not online. Ariaxs
Joined: 27 Feb 2012
Total Posts: 637
07 Jul 2014 07:37 PM
So, Like this correct?

groupid = 795844 --Insert group id here.
function onPlayerRespawned(newPlayer)
wait(1)
if newPlayer:IsInGroup(groupid) then
textgroup = script.Parent.Text
textcolor = script.Parent.TextColor3
UnrefinedRank = newPlayer:GetRoleInGroup(groupid)
if UnrefinedRank >= 8 then
textgroup = "ACCESS LEVEL: RED"
textcolor = Color3.new(255,0,0)
if UnrefinedRank <= 7 then
textgroup = "ACCESS LEVEL: GREEN"
textcolor = Color3.new(0,255,0)

else
UnrefinedRank = "Visitor"
textgroup = "ACCESS LEVEL: NONE"
textcolor = Color3.new(255,255,255)
end
end
end
end


game.Players.PlayerAdded:connect(onPlayerRespawned)
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image