I am doing a commision for someone who is making a donation game, everything is going to plan. But, i have 2 scripts under a button that will set its price and prompt you to buy the shirt. My problem is that when I call them, it doesnt ececute the funciton, like at all. It will call the print statements but not the remote event
I will give the important parts of the code here:
local function IdInvoke(request)
if request == "Player" then
elseif request == "TB text" then
local function onButtonPressed()
local function onTriggered()
dataFunc.OnClientInvoke = IdInvoke
local function UpdOwner(newOwner)
owner = newOwner
local function onClaim(player)
claimPrompt.Enabled = false
local function SetAssetId(player)
if player.UserId == booth:GetAttribute("Owner") then
assetId = datadataFunc:InvokeClient("TB text"):Wait()
local asset = MPService:GetProductInfo(assetId, Enum.InfoType.Asset)
if asset.PriceInRobux then
button.Text = asset.PriceInRobux
MPService:PromptPurchase(player, assetId, false, Enum.CurrencyType.Robux)
local function PlayerRemoving(player, plr : Player)
if plr.UserId == player.UserId then
claimPrompt.Enabled = true
local function decipher(player, var)
if var then
All I need is to know why its not working, or a short snippet would be great also.
You have to specify what client to send the info to on the server:
Aren’t donation games against the rules? I don’t really care about the issue personally but ive noticed stuff like “Pls Donate” and other begging places that would have been smashed by the moderation a while ago just freely floating around nowadays. I have no personal problems over those places existing but I was curious about it.
like i said it was for commision, I dont care what happens to they game aslong as I get paid im fine.
Yes, that was a mistake on my end, firing the client was for ui. The local script is my main issue, or recieving the call on the server end. But I cant figure out why its not calling, everything is setup right.
money is money, we can’t deny money (in most cases)
Also instead of using button.Activated using button.MouseButton1Click
I need it to work for mobile aswell, Your suggestion will stop that from working. And that isnt the cause, the print statements are going through, its just not working with the remote
It will continue to work for mobile, I have used that function every single time and there was no problem at all. Even I, as a mobile player can prove this. Since I played my game (that uses that function) functions as if I was using .Activated.
Also, can I see the line that declares “repRemote” as the remoteevent in both scripts?
Its subjective tbh… Activated and MouseButton1Click work the exact same.
Try playing the game, but keep it client-sided and see if the event will show, if that fails try parenting the localscript and remoteevent to the button.
This could’ve also happened because ServerScripts do not work in UI buttons (i think). So try utilizing ServerScriptService, for the server script, and ReplicatedStorage, for the event.
Ill send a video showing me playing with 2 characters, and what gets printed:
I want to see the explorer client-sided. Open the part where the server script is located.
Its kinda weird to understand but instead of just 1 check going through there should be 3, no matter what. I have the server functions setup so that is the first thing that happens.
For the chekcs its one in the client, one in the decipher function, and one in server func
I know what are you trying to say, but can you put a print function on the very start of the server script to see if it’s actually working?
the remote func and event arent made by server but ill send the picture here:
and yes i updated the paths etc.
Alright, but can you still add a print function to the first line of the server script to see if it’s actually working?
It seems like you have a wait function? Maybe wait for like around 10 seconds and try again. I replicated this and it works as normal.