|
| 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 |
|
|
| |
|
| |
|
|
| 08 Feb 2016 03:00 PM |
| gonna keep bumping until someone replies something worthwhile |
|
|
| Report Abuse |
|
|
davisky2
|
  |
| Joined: 04 Mar 2012 |
| Total Posts: 4710 |
|
|
| 08 Feb 2016 03:08 PM |
Shouldn't they be two seperate scripts?
~davisky~ |
|
|
| Report Abuse |
|
|
|
| 08 Feb 2016 03:09 PM |
| Actually that is a good point... |
|
|
| Report Abuse |
|
|
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 |
|
|
|
| 08 Feb 2016 03:46 PM |
| where do you place this script? in a brick? |
|
|
| Report Abuse |
|
|
| |
|
|
| 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 |
|
|