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 » Scripters
Home Search
 

Re: HELP! GAME PASS PROBLEM

Previous Thread :: Next Thread 
DefaultInfinity is not online. DefaultInfinity
Joined: 21 Jun 2013
Total Posts: 1066
08 Feb 2016 02:37 PM
So I have made a script so that when you touch a part it comes up with a pop up saying if you want to buy a gamepass.
However right now it doesn't give any warning and it automatically charges your account as soon as you touch it..
Is there any way of making an option? Like yes or no or buy and close?
Thankyou!

The script is here:
id = 360795372 -- gamepass id
script.Parent.Touched:connect(function(hit)
if hit.Parent and game.Players:GetPlayerFromCharacter(hit.Parent) then
p = game.Players:GetPlayerFromCharacter(hit.Parent)
if game:GetService("GamePassService"):PlayerHasPass(p, id) then
script.Parent.CanCollide = false
script.Parent.Transparency = 0.7
wait(0.2)
script.Parent.Transparency = 0
script.Parent.CanCollide = true
else
game:GetService("MarketplaceService"):PromptPurchase(p,id)
end
end
end)
Report Abuse
DefaultInfinity is not online. DefaultInfinity
Joined: 21 Jun 2013
Total Posts: 1066
08 Feb 2016 02:41 PM
bump.
Report Abuse
DefaultInfinity is not online. DefaultInfinity
Joined: 21 Jun 2013
Total Posts: 1066
08 Feb 2016 02:49 PM
bump...
Report Abuse
DefaultInfinity is not online. DefaultInfinity
Joined: 21 Jun 2013
Total Posts: 1066
08 Feb 2016 03:00 PM
gonna keep bumping until someone replies something worthwhile
Report Abuse
davisky2 is not online. davisky2
Joined: 04 Mar 2012
Total Posts: 4710
08 Feb 2016 03:08 PM
Shouldn't they be two seperate scripts?


~davisky~
Report Abuse
DefaultInfinity is not online. DefaultInfinity
Joined: 21 Jun 2013
Total Posts: 1066
08 Feb 2016 03:09 PM
Actually that is a good point...
Report Abuse
davisky2 is not online. davisky2
Joined: 04 Mar 2012
Total Posts: 4710
08 Feb 2016 03:10 PM
I think Prompt Purchase should be in localscript and check in serverscript. Well, at least thats how i do it.


~davisky~
Report Abuse
ToxicCrosses is not online. ToxicCrosses
Joined: 31 May 2015
Total Posts: 38
08 Feb 2016 03:46 PM
where do you place this script? in a brick?
Report Abuse
DefaultInfinity is not online. DefaultInfinity
Joined: 21 Jun 2013
Total Posts: 1066
08 Feb 2016 04:06 PM
yes in the brick.
Report Abuse
SSSpencer413 is not online. SSSpencer413
Joined: 27 Jan 2016
Total Posts: 375
08 Feb 2016 09:28 PM
DO NOT USE GAMEPASS SERVICE. That's pretty much what you need to know. GamePassService Waits till you join a new server before taking effect.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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