SpookyplsJoin Date: 2011-12-09 Post Count: 704 |
This doesn't seem to work. I've changed so many things, and it still doesn't work. I've spent hours on this. Can anyone help me find out what's wrong?
ID = 162597573
GPS = game:GetService("MarketplaceService")
player = script.Parent.Parent.Parent.Parent.Parent
function Buy()
game:GetService("MarketplaceService"):PromptPurchase(player,ID)
GPS.PromptPurchaseFinished:connect(function(player, ID, isPurchased)
if isPurchased then
clone1 = game.ServerStorage["Dual Darkhearts"]:clone()
clone1.Parent = player.Backpack
end
end)
end
script.Parent.MouseButton1Click:connect(Buy) |
|
SpookyplsJoin Date: 2011-12-09 Post Count: 704 |
Bump1. |
|
SpookyplsJoin Date: 2011-12-09 Post Count: 704 |
Bump2. |
|
SpookyplsJoin Date: 2011-12-09 Post Count: 704 |
Bump3. |
|
SpookyplsJoin Date: 2011-12-09 Post Count: 704 |
Bump4. |
|
|
Looks fine, any output? Maybe your pathways are wrong? |
|
|
How about, if they already owned it when they come into the game?
If the gamepass is already created then it should not work because you already own it and cannot buy it again.
Yolo I'm going to be a penguin now. :3 |
|
|
i am not sure but i think you need to use player.userId not player |
|
|
Possibly because you already own the gamepass? |
|
SpookyplsJoin Date: 2011-12-09 Post Count: 704 |
That's the thing, I can't see the output because I already own it. |
|
SpookyplsJoin Date: 2011-12-09 Post Count: 704 |
Basically, I'm trying to make it so when they buy the gamepass from the Gui in-game, it gives them the sword and continues to after they die. That way they don't need to wait for a new server. |
|
|
player = game.Players.LocalPlayer.Character |
|
SpookyplsJoin Date: 2011-12-09 Post Count: 704 |
Really, that's why..? |
|
|
hold on, dont use .character, just do
local player = game.Players.LocalPlayer
try it.. |
|
SpookyplsJoin Date: 2011-12-09 Post Count: 704 |
Okay. |
|
SpookyplsJoin Date: 2011-12-09 Post Count: 704 |
Well.. I found out what the problem is..
I had a friend buy one of the swords, output reads "ServerStorage is not a valid member of DataModel."
Is there anyway you can change that without using the Lighting? |
|
|
remove some of the parents on until it works :).
player = script.Parent.Parent.Parent.Parent.Parent |
|
|
Ooops wait I don't think that will do anything. |
|
SpookyplsJoin Date: 2011-12-09 Post Count: 704 |
Yeah, I don't know.. |
|