|
| 03 Aug 2017 10:26 PM |
Hello!
Im needing some help making the chat say "Thank you for donating" and then the players name who bought the developer product. Here is what i have so far
local MarketplaceService = game:GetService('MarketplaceService') local devproductid = 84486886
MarketplaceService.ProcessReceipt = function(receiptInfo) for i, player in ipairs(game.Players:GetChildren()) do if player.userId == receiptInfo.PlayerId then if receiptInfo.ProductId == devproductid then game.StarterGui:SetCore("ChatMakeSystemMessage", { Text = "Thank You For Donating!"; -- Required. Has to be a string! Color = Color3.new(0, 1, 1); -- Cyan is (0, 25### #5####5### #5#####ptional, defaults to white: Co############## #5####5### #5####4### #5#### Font = Enum.Font.SourceSans; -- Optional, defaults to Enum.Font.SourceSansBold FontSize = Enum.FontSize.Size42; -- Optional, defaults to Enum.FontSize.Size18 }) end end end return Enum.ProductPurchaseDecision.PurchaseGranted end
Please Help Me, It works in a Test but when i try with the real game it doesnt work, and if its possible i would like it to say the name of the donator.
Thanks, Collinator24 |
|
|
| Report Abuse |
|
|
|
| 03 Aug 2017 10:31 PM |
Also, I Wanted To Know If The Chat Message Will Show To The Entire Server
Thanks, Collinator24 |
|
|
| Report Abuse |
|
|
| |
|
|
| 03 Aug 2017 10:51 PM |
| - The Script Posted Above Is In The Server Script Storage |
|
|
| Report Abuse |
|
|
|
| 03 Aug 2017 11:03 PM |
| Does anyone have a solution?! |
|
|
| Report Abuse |
|
|
Niveum
|
  |
| Joined: 15 Aug 2009 |
| Total Posts: 3437 |
|
|
| 03 Aug 2017 11:04 PM |
| game.StarterGui:SetCore has to be used locally. Setup a client event that runs the code for the chat system message, and then call it from the server using ########lients() to make it display to all players. ~ S P I C Y ~ |
|
|
| Report Abuse |
|
|
Niveum
|
  |
| Joined: 15 Aug 2009 |
| Total Posts: 3437 |
|
|
| 03 Aug 2017 11:06 PM |
game.StarterGui:SetCore has to be used locally.
Setup a client event that runs the code for the chat system message, and then call it from the server using the fire all clients method of a Remote Event to make it display to all players.
~ S P I C Y ~ |
|
|
| Report Abuse |
|
|
|
| 03 Aug 2017 11:13 PM |
how to i trigger a localscript within a script. from what i know i have a script that when you buy it, it will activate a localscript. Thanks, Collinator24 |
|
|
| Report Abuse |
|
|
| |
|
|
| 03 Aug 2017 11:25 PM |
| Does anyone know how to trigger a script with a script? |
|
|
| Report Abuse |
|
|
| |
|
Niveum
|
  |
| Joined: 15 Aug 2009 |
| Total Posts: 3437 |
|
|
| 03 Aug 2017 11:37 PM |
"Trigger a localscript within a script"
If you can access the local script using a server script then disabled its disabled property
if you cant access it, welcome to the world of remote events and functions my friend.
~ S P I C Y ~ |
|
|
| Report Abuse |
|
|
|
| 03 Aug 2017 11:44 PM |
| I have already tried that one, it runs when they reset, but i need it to run right away |
|
|
| Report Abuse |
|
|
Niveum
|
  |
| Joined: 15 Aug 2009 |
| Total Posts: 3437 |
|
|
| 03 Aug 2017 11:50 PM |
how about; you learn to script it yourself instead of telling us nothings working :o
~ S P I C Y ~ |
|
|
| Report Abuse |
|
|
|
| 03 Aug 2017 11:52 PM |
| The reason im here is to learn. Isn't that why this Forum exists, to get help? or am i wrong? |
|
|
| Report Abuse |
|
|
| |
|
Niveum
|
  |
| Joined: 15 Aug 2009 |
| Total Posts: 3437 |
|
|
| 04 Aug 2017 12:01 AM |
Fine :^)
Why are you trying to 'trigger' a localscript from another script? What's your goal here.
~ S P I C Y ~ |
|
|
| Report Abuse |
|
|
|
| 04 Aug 2017 12:04 AM |
| My goal was to make it so when someone donates with the developer product, it says in chat "Thank you for donating!" |
|
|
| Report Abuse |
|
|