|
| 04 Apr 2016 08:11 PM |
Its not letting anyone else buy the game pass, and when I join it teleports me right away to the game.
-Its supposed to teleport the player when they hit the part, if they don't own it then ask them to buy it.
Server Script; Server Script Service:
buy1.OnServerEvent:connect(function(player) if game:GetService("MarketplaceService"):PlayerOwnsAsset(player,393944058) then --change '30331986' to your id print('Requesting Server') game:GetService("TeleportService"):Teleport(393931021, player) print('Server Accepted') else game:GetService("MarketplaceService"):PromptProductPurchase(player, 393944058) --change '30331986' to your id print('A player tried to teleport') end end)
Local Script; Starter Player Scripts
game.Workspace.Teleport1.Touched:connect(function() game.Workspace.BuyEvent1:FireServer() end) |
|
|
| Report Abuse |
|
|
|
| 04 Apr 2016 08:25 PM |
| On this: http://www.roblox.com/games/393539628/Speed-Run-Re-imagined |
|
|
| Report Abuse |
|
|
| |
|
|
| 04 Apr 2016 09:27 PM |
| Can I please get some help..? |
|
|
| Report Abuse |
|
|
dave2011
|
  |
| Joined: 02 Oct 2010 |
| Total Posts: 10581 |
|
|
| 04 Apr 2016 09:33 PM |
whats the problem with it?
|
|
|
| Report Abuse |
|
|
Darkenus
|
  |
| Joined: 17 Jul 2014 |
| Total Posts: 1997 |
|
|
| 04 Apr 2016 09:35 PM |
what do the print statements say?
off topic here but, DAMNN LUABASICS, BACK AT IT AGAIN WITH THE SPEED RUNS! |
|
|
| Report Abuse |
|
|
|
| 04 Apr 2016 09:41 PM |
| @Dave, It works flawlessly but its one flaw xp, is that if a player buys it, it teleports them, and if they leave and try to rejoin the main game, it teleports them right back, also once a player uses it, the other players can't buy it. (Its on FE) |
|
|
| Report Abuse |
|
|
dave2011
|
  |
| Joined: 02 Oct 2010 |
| Total Posts: 10581 |
|
|
| 04 Apr 2016 09:43 PM |
sounds like you have a problem with your event to me, idk whenever I deal with remoteevents I cry and bash my head into the keyboard until it works
|
|
|
| Report Abuse |
|
|
Darkenus
|
  |
| Joined: 17 Jul 2014 |
| Total Posts: 1997 |
|
|
| 04 Apr 2016 09:43 PM |
http://wiki.roblox.com/index.php?title=API:Class/MarketplaceService/PromptProductPurchase
PromptProductPurchase() is exclusively for Developer Products.
Use PromptPurchase() instead:
http://wiki.roblox.com/index.php?title=API:Class/MarketplaceService/PromptPurchase |
|
|
| Report Abuse |
|
|
|
| 04 Apr 2016 09:54 PM |
| Can someone join and just help me test, (walk into the portal). |
|
|
| Report Abuse |
|
|
dave2011
|
  |
| Joined: 02 Oct 2010 |
| Total Posts: 10581 |
|
| |
|
|
| 04 Apr 2016 09:56 PM |
| You don't need to be added to join. |
|
|
| Report Abuse |
|
|
dave2011
|
  |
| Joined: 02 Oct 2010 |
| Total Posts: 10581 |
|
|
| 04 Apr 2016 09:57 PM |
I havent followed in so long, didnt see the button, either way I clicked the link above
|
|
|
| Report Abuse |
|
|
|
| 04 Apr 2016 09:58 PM |
| Boom, found my problem, when someone else walks into it, it fires. |
|
|
| Report Abuse |
|
|
dave2011
|
  |
| Joined: 02 Oct 2010 |
| Total Posts: 10581 |
|
|
| 04 Apr 2016 10:01 PM |
can you come help with my place now, testing cross server chat:
http://www.roblox.com/games/387308738/Primary-Pre-Alpha
|
|
|
| Report Abuse |
|
|
|
| 04 Apr 2016 10:02 PM |
| What are you using for your cross server chat..? |
|
|
| Report Abuse |
|
|
dave2011
|
  |
| Joined: 02 Oct 2010 |
| Total Posts: 10581 |
|
|
| 04 Apr 2016 10:02 PM |
httpservice, its a single player game so I want to make players less lonely
|
|
|
| Report Abuse |
|
|
|
| 04 Apr 2016 10:05 PM |
| Also, any idea why its firing for all the clients..? |
|
|
| Report Abuse |
|
|
dave2011
|
  |
| Joined: 02 Oct 2010 |
| Total Posts: 10581 |
|
| |
|
|
| 04 Apr 2016 10:07 PM |
| I did, at the top of the forum post. |
|
|
| Report Abuse |
|
|
|
| 04 Apr 2016 10:10 PM |
| Here rejoin the game, don't go into the portal this time. |
|
|
| Report Abuse |
|
|
dave2011
|
  |
| Joined: 02 Oct 2010 |
| Total Posts: 10581 |
|
|
| 04 Apr 2016 10:11 PM |
what did my chat script say when I said something filtered?
game.Workspace.Teleport1.Touched:connect(function() game.Workspace.BuyEvent1:FireServer() end)
also this just fires whenever the event happens, put this instead:
game.Workspace.Teleport1.Touched:connect(function(p) if p.Parent.Name==game.Players.LocalPlayer.Name then game.Workspace.BuyEvent1:FireServer() end end)
|
|
|
| Report Abuse |
|
|
|
| 04 Apr 2016 10:15 PM |
| Here rejoin, I added the part you said to. Also how would I check if it was that player that hit it, on the server script..? |
|
|
| Report Abuse |
|
|
dave2011
|
  |
| Joined: 02 Oct 2010 |
| Total Posts: 10581 |
|
|
| 04 Apr 2016 10:15 PM |
the localscript already does it I think, let me join
|
|
|
| Report Abuse |
|
|
| |
|