I have a remote event which is fired from server to the client to display a system message, but it doesn’t do anything. Any ideas why? (The local script is in starter player scripts)
Server:
local function onPromptPurchaseFinished(player, assetId, isPurchased)
if isPurchased then
local asset = MarketPlaceService:GetProductInfo(assetId)
local leaderstats = player.leaderstats
local donated = leaderstats.Donated
local price = asset.PriceInRobux
donated.Value += asset.PriceInRobux
local name = player.Name
local Message = name .. " donated " .. price .. " robux to " .. winner.Name
Remote:FireAllClients(player, Message)
else
print("Not Purchased")
end
end
Local:
local RS = game:GetService("ReplicatedStorage")
local Remote = RS.SystemMessage
Remote.OnClientEvent:Connect(function(Message: string)
game.TextChatService.TextChannels.RBXGeneral:DisplaySystemMessage(Message)
end)
Have you tried printing before the event should fire in the server script to ensure it gets there. Printing where it should have fired in the local script to make sure it gets it. And tried running that line in the function by itself to make sure both the local script is actually running and the line is having the desired effect by itself?
Yeah it’s not firing for some reason, I just put this bit of code in an empty script that has no requirements and the print statement in the local script never printed.
local Message = "Server balha hfgbsdj"
Remote:FireAllClients(player, Message)
Just realised player shouldn’t be an arguement, so removed and tested but still not working