|
| 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 |
|
|
|
| 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 |
|
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
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
|
  |
| Joined: 04 Jul 2012 |
| Total Posts: 7177 |
|
|
| 10 Mar 2014 11:24 PM |
| ^I doubt he understood half of that |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
|
| 11 Mar 2014 03:43 PM |
function pie() if (game:GetService("GamePassService"):PlayerHasPass(player,148199012)) then allowed = true end end |
|
|
| Report Abuse |
|
|