Well i know one way i dunno if it is good but bassicaly what you do is:
Make the button with local script that will fire event to server script:
script.Parent.MouseButton1Click:Connect(function()
local event = game.ReplicatedStorage.RemoteEvent
event:FireServer()
end)
This will fire the event.
Then you make server script that will receive the fire event and send another one (sorry for bad explanation):
local event = game.ReplicatedStorage.RemoteEvent
local event2 = game.ReplicatedStorage.RemoteEvent2
event.OnServerEvent:Connect(function()
event2:FireAllClients()
end)
AND then you make another local script in gui (put wherever you want) and it will receive another event (again sorry for explanation):
local event2 = game.ReplicatedStorage.RemoteEvent2
local player = game.Players.LocalPlayer
event2.OnClientEvent:Connect(function()
if player:GetRankInGroup("group id") == 123 then
local text Instance.new("TextLabel", player.PlayerGui)
print("received3")
end
end)
You gotta make 2 remote events in replicated storage but i guess you know it.
Hope it helps.
1 comment
A RemoteEvent won't work unless you want communication between a server script and local script. Working with GUIs means you're working with the Client. You would use a BindableEvent because it's used for communication between server and server or client and client.