local Tienda = game.Workspace["Caja Fuerte"].Proxi.RoboTienda
Tienda.PromptButtonHoldBegan:Connect(function()
for _, plr in ipairs(game.Players:GetPlayers()) do
plr.PlayerGui:SetCore("SendNotification", {
Title = "Tienda";
Text = "¡Robo comenzado en tienda!";
Icon = "http://www.roblox.com/asset/?id=247419511";
})
end
end)
You’re going to want to use RemoteEvents for this. I’m assuming your script is a ServerScript.
This should be a server script:
local remote = path.to.remote -- probably in replicated storage
prompt.PromptButtonHoldBegan:Connect(function()
remote:FireAllClients({ -- this is going to send this table to all clients which is what you're looking to achieve, if you want to work with notifications more, you can also fire individual clients. (remote:FireClient(player))
-- I'd send the table to the client so this remote can be more versatile, removing repetitive remotes, allowing more than one type of notification per remote if that makes sense
Title = "Tienda";
Text = "¡Robo comenzado en tienda!";
Icon = "http://www.roblox.com/asset/?id=247419511";
})
end)
Then on the client.
local remote = path.to.remote
remote.OnClientEvent:Connect(function(notificationTable)
game:GetService('StarterGui'):SetCore('SendNotification', notificationTable)
end)