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: GamePass user enters server = an idle script activates

Previous Thread :: Next Thread 
MrRobloxian is not online. MrRobloxian
Joined: 13 Oct 2008
Total Posts: 7
15 Aug 2013 06:16 PM
Basic idea: I'm going to need a ladder to go over a wall on both sides every 10 minutes or so for around 30 seconds each time. I have the script to do this, but I only want the script to activate when a user with the gamepass for the ladder feature is in the server. It would also be nice, but not necessary, if you could help me with making this ladder script go idle again when there are 0 gamepass players in the server.

Also, is there a way to do this without multiplying the idle script when more than one person with the gamepass is in the server? If so, help would be appreciated.

Thanks in advance!
Report Abuse
MeBilly8440 is not online. MeBilly8440
Joined: 27 Jul 2009
Total Posts: 2783
15 Aug 2013 06:19 PM
I'm going to guess you already have the "make ladders show up every 10 minutes for 30 seconds" thing figured out. Here's how you would do the gamepass part:

local pass = 0 -- The ID of the gamepass
local passFound = false
for i, player in pairs(game.Players:GetPlayers()) do
if (game:GetService("GamePassService"):PlayerHasPass(player, pass)) then
passFound = true
end
end
if (passFound) then
-- Do your ladder thing
end
end

Wiki Profile: http://wiki.roblox.com/index.php/User:Nelson
Report Abuse
MrRobloxian is not online. MrRobloxian
Joined: 13 Oct 2008
Total Posts: 7
15 Aug 2013 06:23 PM
Thanks for the help!
Report Abuse
SpleenYanks is not online. SpleenYanks
Joined: 24 Aug 2008
Total Posts: 921
15 Aug 2013 06:27 PM
Wrote a script, tried to post it, Roblox says there is a badbad word in it. #RobloxFails.
Report Abuse
MeBilly8440 is not online. MeBilly8440
Joined: 27 Jul 2009
Total Posts: 2783
15 Aug 2013 06:27 PM
#pastebin

Wiki Profile: http://wiki.roblox.com/index.php/User:Nelson
Report Abuse
WillScriptForFood is not online. WillScriptForFood
Joined: 03 Aug 2013
Total Posts: 701
15 Aug 2013 06:30 PM
@Spleen
#FirstWorldProblems
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