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 Script Help pls

Previous Thread :: Next Thread 
MarsPwnsAll is not online. MarsPwnsAll
Joined: 10 Jul 2011
Total Posts: 314
10 Mar 2014 06:36 PM
allowed = {game.Players.LocalPlayer.Name}

for _,v in ipairs(allowed)do
allowed[v]=true
end
function pie()
if (game.Players.LocalPlayer.stats.Level.Value >= 300) and (game:GetService("GamePassService"):PlayerHasPass(allowed,148199012)) then
game.Players.LocalPlayer.PlayerGui.SpecialGUI.Characters['1'].Characters1.Lucemon15.Visible = allowed[game.Players.LocalPlayer.Name]
end
end
script.Parent.MouseButton1Click:connect(pie)




The gamepass check isn't working, is my guess.. But i'm not sure how to fix it Dx
Report Abuse
MarsPwnsAll is not online. MarsPwnsAll
Joined: 10 Jul 2011
Total Posts: 314
10 Mar 2014 06:51 PM
I changed the script drastically to this, would it work? (Ps it word wraps a little)

player = game.Players.LocalPlayer.Name
allowed = false

function pie()
if (game:GetService("GamePassService"):PlayerHasPass(player,148199012)) then
allowed = true
end

if (allowed == true) then
game.Players.LocalPlayer.PlayerGui.SpecialGUI.Characters['1'].Characters1.Lucemon15.Visible = allowed[game.Players.LocalPlayer.Name]
end
end
Report Abuse
MarsPwnsAll is not online. MarsPwnsAll
Joined: 10 Jul 2011
Total Posts: 314
10 Mar 2014 07:22 PM
Help please.
Report Abuse
MarsPwnsAll is not online. MarsPwnsAll
Joined: 10 Jul 2011
Total Posts: 314
10 Mar 2014 07:37 PM
Help pls.jpg
Report Abuse
MarsPwnsAll is not online. MarsPwnsAll
Joined: 10 Jul 2011
Total Posts: 314
10 Mar 2014 08:35 PM
Bump3
Report Abuse
MarsPwnsAll is not online. MarsPwnsAll
Joined: 10 Jul 2011
Total Posts: 314
10 Mar 2014 08:46 PM
bump4
Report Abuse
MarsPwnsAll is not online. MarsPwnsAll
Joined: 10 Jul 2011
Total Posts: 314
10 Mar 2014 09:09 PM
bump5
Report Abuse
MarsPwnsAll is not online. MarsPwnsAll
Joined: 10 Jul 2011
Total Posts: 314
10 Mar 2014 09:34 PM
bump6
Report Abuse
MarsPwnsAll is not online. MarsPwnsAll
Joined: 10 Jul 2011
Total Posts: 314
10 Mar 2014 09:50 PM
bump7
Report Abuse
MarsPwnsAll is not online. MarsPwnsAll
Joined: 10 Jul 2011
Total Posts: 314
10 Mar 2014 10:22 PM
bump8
Report Abuse
MarsPwnsAll is not online. MarsPwnsAll
Joined: 10 Jul 2011
Total Posts: 314
10 Mar 2014 10:33 PM
bump9
Report Abuse
MarsPwnsAll is not online. MarsPwnsAll
Joined: 10 Jul 2011
Total Posts: 314
10 Mar 2014 10:56 PM
bump10
Report Abuse
DataStore is not online. DataStore
Joined: 07 Feb 2012
Total Posts: 8540
10 Mar 2014 11:19 PM
Please do read up on things before attempting to use them.

1) The PlayerHasPass cannot be used client side.
2) PlayerHasPass takes an instance (the player), not a string.
3) I don't get why you're doing something weird with an "allowed" variable. You could just keep the if statement on the second line and get rid of the next four lines.
4) You never use the function, in your second post.

Report Abuse
Goulstem is not online. Goulstem
Joined: 04 Jul 2012
Total Posts: 7177
10 Mar 2014 11:24 PM
^I doubt he understood half of that
Report Abuse
MarsPwnsAll is not online. MarsPwnsAll
Joined: 10 Jul 2011
Total Posts: 314
11 Mar 2014 03:40 PM
1) The PlayerHasPass cannot be used client side.
2) PlayerHasPass takes an instance (the player), not a string.
3) I don't get why you're doing something weird with an "allowed" variable. You could just keep the if statement on the second line and get rid of the next four lines.
4) You never use the function, in your second post.


--

1- I'm not sure how to make it server sided ;-;

2- I was using a string? q-q.. Dunno how to fix that

3- It was working before, on a different script with just permissions that I was using, so I just left it and editted the existing script for gamepasses (which obviously i failed at)

4- I used it, just forgot to copy it lol, its a click function

Thanks for your reply, although i'm not entirely sure how to fix it
Report Abuse
KiwiTronik is not online. KiwiTronik
Joined: 18 Feb 2010
Total Posts: 3221
11 Mar 2014 03:43 PM
function pie()
if (game:GetService("GamePassService"):PlayerHasPass(player,148199012)) then
allowed = true
end
end
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