thetacah
|
  |
| Joined: 18 Jan 2013 |
| Total Posts: 16026 |
|
|
| 23 Sep 2013 06:39 PM |
I thought I should start out clean. What's wrong with this script? No output errors. I tested it out on play. Nothing seems to be working for one reason or another.
function CLICKEDNOOB(Player) if not game:GetService("MarketplaceService"):PlayerOwnsAsset(Player, 24341406) then print("Player dosen't own the item!") game:GetService("MarketplaceService"):PromptPurchase(Player, 24341406, false, Robux) end end
script.Parent.MouseClick:connect(CLICKEDNOOB) |
|
|
| Report Abuse |
|
|
Excellus
|
  |
| Joined: 17 Jun 2013 |
| Total Posts: 3939 |
|
|
| 23 Sep 2013 06:40 PM |
why do you use if not
that's so dumb
|
|
|
| Report Abuse |
|
|
thetacah
|
  |
| Joined: 18 Jan 2013 |
| Total Posts: 16026 |
|
|
| 23 Sep 2013 06:41 PM |
| @Excellus, Ikr I got that from that noob on my other thread. |
|
|
| Report Abuse |
|
|
Voidion
|
  |
| Joined: 01 Aug 2011 |
| Total Posts: 2668 |
|
|
| 23 Sep 2013 06:42 PM |
Did you ignore what I posted in the last thread? The connection line should look like this:
script.Parent.ClickDetector.MouseClick:connect(CLICKEDNOOB)
and put a ClickDetector in the part |
|
|
| Report Abuse |
|
|
thetacah
|
  |
| Joined: 18 Jan 2013 |
| Total Posts: 16026 |
|
|
| 23 Sep 2013 06:44 PM |
| @Voidion, are you serious? I have a clickdetector before In posted my other thread, i'm not dumb. And I did script.Parent which is the clickdetector.! |
|
|
| Report Abuse |
|
|
thetacah
|
  |
| Joined: 18 Jan 2013 |
| Total Posts: 16026 |
|
|
| 23 Sep 2013 06:46 PM |
I like this version better!
function CLICKEDNOOB(Player)
if game:GetService("MarketplaceService"):PlayerOwnsAsset(Player, 24341406) then else print("Player dosen't own the item!") game:GetService("MarketplaceService"):PromptPurchase(Player, 24341406, false, Robux)
end end
script.Parent.MouseClick:connect(CLICKEDNOOB) |
|
|
| Report Abuse |
|
|
Voidion
|
  |
| Joined: 01 Aug 2011 |
| Total Posts: 2668 |
|
|
| 23 Sep 2013 06:49 PM |
| why put the script in the clickdetector? |
|
|
| Report Abuse |
|
|
|
| 23 Sep 2013 06:50 PM |
"Ikr I got that from that noob on my other thread."
Why are you using it then? You are the one asking for help so please refrain from insulting people that actually want to help you. |
|
|
| Report Abuse |
|
|
thetacah
|
  |
| Joined: 18 Jan 2013 |
| Total Posts: 16026 |
|
|
| 23 Sep 2013 06:51 PM |
@Voidion, because there's no problem with doing that
function CLICKEDNOOB(Player)
if game:GetService("MarketplaceService"):PlayerOwnsAsset(Player, 24341406) then else print("Player dosen't own the item!") game:GetService("MarketplaceService"):PromptPurchase(Player, 24341406, false, Robux)
end end
script.Parent.MouseClick:connect(CLICKEDNOOB) |
|
|
| Report Abuse |
|
|
Voidion
|
  |
| Joined: 01 Aug 2011 |
| Total Posts: 2668 |
|
|
| 23 Sep 2013 06:52 PM |
i know, but there wouldn't be any problems if you just put the script in the part... ...so yeah... |
|
|
| Report Abuse |
|
|
thetacah
|
  |
| Joined: 18 Jan 2013 |
| Total Posts: 16026 |
|
|
| 23 Sep 2013 06:53 PM |
| @Voidion, it doesn't matter. |
|
|
| Report Abuse |
|
|