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: Help!

Previous Thread :: Next Thread 
weegeeizcool is not online. weegeeizcool
Joined: 23 Aug 2012
Total Posts: 350
09 Jan 2014 01:53 PM
I made a simple script that's supposed to give the player the tool of they have the gamepass and ask the player to buy the pass if they DON'T have the pass, but it won't give me the tool.


GamePassService = game:GetService("GamePassService")
MarketplaceService = game:GetService("MarketplaceService")
gamepassid = 141485423
Lighting = game:GetService("Lighting")
ScreenGui = script.Parent.Parent.Parent
Player = game.Players.LocalPlayer
Backpack = Player.Backpack
item = Lighting:FindFirstChild("Powers")

function onClick()
if GamePassService:PlayerHasPass(Player, gamepassid) then
item:Clone().Parent = Backpack
ScreenGui:remove()
else
MarketplaceService:PromptPurchase(player, gamepassid)
end
end

script.Parent.MouseButton1Down:connect(onClick)
Report Abuse
DataStore is not online. DataStore
Joined: 07 Feb 2012
Total Posts: 8540
09 Jan 2014 01:56 PM
"This item should be used with a Script (As opposed to a LocalScript) in order to work as expected in online mode."
Report Abuse
weegeeizcool is not online. weegeeizcool
Joined: 23 Aug 2012
Total Posts: 350
09 Jan 2014 01:58 PM
Ok.
Report Abuse
weegeeizcool is not online. weegeeizcool
Joined: 23 Aug 2012
Total Posts: 350
09 Jan 2014 02:02 PM
I tested it on the game with a regular script and it still didn't give me the tool.
Report Abuse
weegeeizcool is not online. weegeeizcool
Joined: 23 Aug 2012
Total Posts: 350
09 Jan 2014 02:03 PM
Just now.
Report Abuse
DataStore is not online. DataStore
Joined: 07 Feb 2012
Total Posts: 8540
09 Jan 2014 02:05 PM
And you removed your use of "LocalPlayer" when you did that, right?
Report Abuse
weegeeizcool is not online. weegeeizcool
Joined: 23 Aug 2012
Total Posts: 350
09 Jan 2014 02:06 PM
No. It would take like 7 .Parents to do that.
Report Abuse
weegeeizcool is not online. weegeeizcool
Joined: 23 Aug 2012
Total Posts: 350
09 Jan 2014 02:14 PM
Ok it works. Thank you.
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