Basically I invoke the client on the server to show a prompt GUI with two buttons "Yes" and "No". I want to make it return either false or true to what they pick, but whenever I put the return true and return false in their respective MouseButton1Click functions, the ClientInvoke function instantly returns with false every time no matter if you pick true or false or if you even pick any of them. I'm pretty new to RemoteFunctions so any help would be appreciated.
events = game:GetService("ReplicatedStorage").GameEvents.BankRobbery
promptcontainer = script.Parent:WaitForChild("PromptContainer")
events.PromptBankRobbery.OnClientInvoke = function()
promptcontainer.Visible = true
promptcontainer.Yes.MouseButton1Click:Connect(function()
promptcontainer.Visible = false
return true
end)
promptcontainer.No.MouseButton1Click:Connect(function()
promptcontainer.Visible = false
return false
end)
end
