You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Keep it simple and clear! I want to fire a remote event to show the messages defined in the script for everyone that is the rank moderator
-
What is the issue? I’m unsure how to use a remote event
-
What solutions have you tried so far? I tried to fire the server and do the on server event but no luck
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
Client
local Remote_Event = game.ReplicatedStorage.RemoteEvent
local Called = false
local PlayerGui = game.Players.LocalPlayer:WaitForChild("PlayerGui")
local Player = game.Players.LocalPlayer
local Frame = game.Players.LocalPlayer.PlayerGui.ScreenGui.Report_Menu
local Button = script.Parent
local Ranks = {Player:GetRankInGroup(10886396), -- was 1
Player:GetRankInGroup(10886396,255)
}
local Messages = {game.Players.LocalPlayer.PlayerGui.ScreenGui.Sucess,
game.Players.LocalPlayer.PlayerGui.ScreenGui.Submit.Error
}
Button.MouseButton1Click:Connect(function()
Remote_Event:FireServer()
wait(1)
print("Thanks for submitting")
wait(1)
Frame.Visible = false
Called = true
if Called == true and game.Players.LocalPlayer:GetRankInGroup(10886396) < 255 then -- specified for players less then moderator rank
print("Sucessfully submited the Report")
Messages[1].Visible = false
Messages[1].Visible = true
wait(30)
Messages[1].Visible = false
else
Called = true and game.Players.LocalPlayer:GetRankInGroup(10886396,255) -- the group rank for your admins
print("The Player Rank is Moderator")
wait(1)
print(Player.Name .. "A new report has been recieved")
Messages[2].Visible = true
wait(30)
Messages[2].Visible = false
end
end)
local Remote_Event = game.ReplicatedStorage.RemoteEvent
Remote_Event.OnServerEvent:Connect(function()
-- how do i even show a UI for all player's?
-- Code
end)
Server
Hello I’m trying to fire a remote event to get my GUI to show for everyone who is the rank Moderator, but the problem is I’m not sure how to can someone please explain how to do this because it’s confusing. Thanks for your help.