So I am designing an admin panel for a group and I want to have a notification feature where it will tween in an existing GUI which is not visible once the button has been clicked. I have tried every possible method using remote events I could think of but they all seem to not work at all (none leave errors in the output either)
Here is my most recent attempt:
local input = script.Parent.Parent.TextBox
button.MouseButton1Click:Connect(function()
local reason = input.Text
if reason == "" then
input.PlaceholderText = "Please enter text!"
else
game.ReplicatedStorage.smHandler:FireServer("Button to server", reason)
input.PlaceholderText = "Notification sent!"
end
end)
game.ReplicatedStorage.smHandler.OnClientEvent:Connect(function (player, request, reason)
if request == "Button to server" then
game.StarterGui.ScreenGui.Enabled = true -- just added to test
end
end)
and the server side:
local event = game:GetService("ReplicatedStorage").smHandler
event.OnServerEvent:Connect(function (player, request, reason)
if request == "Button to server" then
event:FireAllClients(player, request, reason)
end
end)
If anyone has some insight on where I am going wrong or could explain just a bit more on how to get a client to fire all the other clients without going through the server I'd love to hear :)
Thanks in advanced!
