Yes, you absolutely have to check it in a published game, not just in Studio, especially for the purchase part!
This is the most common reason why MarketplaceService:PromptProductPurchase appears to "do nothing" in Roblox Studio:
🔴 Why MarketplaceService:PromptProductPurchase Doesn't Work in Studio:
- Real Transactions: Developer Product purchases involve real Robux transactions, which occur on Roblox's live servers, not locally in Studio.
- No Prompt: When you call
PromptProductPurchase in Studio, it simply does not display the purchase prompt. It won't throw an error, it just silently fails to open the UI.
ProcessReceipt Not Triggered: Consequently, the MarketplaceService.ProcessReceipt function on your server script won't be triggered, because no actual purchase went through.
✅ What You NEED to Do:
- Publish Your Game:
- Go to File > Publish to Roblox As...
- Publish your game (or update an existing one).
- Join the Live Game:
- Go to your game's page on Roblox.com.
- Click the "Play" button to join the live server.
- Test the Purchase:
- As a regular player (not the owner), click a troll button. You should now see the Robux purchase prompt.
- If you complete the purchase (even with 0 Robux products for testing), the troll effect should then trigger.
💡 How to Debug Owner's Free Trolls in Studio:
For the owner's free trolls, FireServer should work in Studio because it's just client-to-server communication, not a real transaction. If the owner's trolls aren't working in Studio, the problem lies in the communication or the server-side logic for the owner.
Let's use the print() statements from the last version. Follow these steps precisely:
- Open Roblox Studio.
- Go to View > Output (make sure this window is visible).
- Click the "Play" button (or "Run" button) in Studio to start a test session.
- As the Owner (your account):
- Open your spectate GUI.
- Select a target.
- Click a troll button.
- Look at the Output window immediately.
What prints should you see?
What to do based on what you see:
- If you see "Owner troll fired..." but NOT "Owner troll: [ButtonName]...": The
OwnerTrollEvent might not be created on the server, or the server isn't listening properly. Make sure the OwnerTrollEvent creation Instance.new("RemoteEvent") is in the ServerScriptService script, not a LocalScript.
- If you see "Owner troll: [ButtonName]..." but no effect: The server-side logic for that specific troll effect (
if action == "KillButton" then ... end) is failing. Double-check the action string exactly matches the if condition, and that the effect code (e.g., humanoid.Health = 0) has no errors.
Please try these steps and let me know the exact messages you see (or don't see) in the Output window when you click a troll button as the owner in Studio. This is the crucial information needed to pinpoint the remaining issue.