I'm making a automatic Barista. The Client Picks a snack, The snack is sent to the main local script through BindableEvent. Then The Local scripts checks if the barista is free or not.
local Events = game.ReplicatedStorage.Events local IsWaiting = false Events.SendSnackClicked.Event:connect(function(Coordinates) if IsWaiting == false then IsWaiting = true Events.SnackToServer:InvokeServer(Coordinates) end end)
But I want to make a custom wait Gui, which I haven't made. But lets say its -
function CustomWait() script.Parent.Text =" Please Wait" end
how do I make it so the script is something like
repeat CustomWait() until It's returned
InvokeServer yields until the Server returns.
So, the answer is simple. Make the GUI appear before making the request, and hide it after InvokeServer.