I am currently experimenting with using tables in my remote events as a suppose to individually listing each individual thing. But when I try to use as asset of my table in my server serverscript it just comes back as an unknown global so I am unsure how I am suppose to use stuff from my tables in my server scripts. Here are my scripts for example.
Local Script:
function OnSisterNeeded()
if SistersNeeded then
local Table = {
CoWorkers,
SistersNeeded
}
RemoteEvents.ServerReturnFunction:InvokeServer("NeedSisters", Table)
end
end
ServerScript
RemoteEvents.ServerReturnFunction.OnServerInvoke = function(Player, Event, Table)
local WebhookURL = "NOTHING FOR PRIVACY"
local Role = Player:GetRoleInGroup(ServerGroupID)
local Rank = Player:GetRankInGroup(ServerGroupID)
local UserID = Player.UserId
local Username = Player.Name
if Event == "NeedSisters" then
if Rank < MinimumRankToAccessStaffTools then return end
local NeedSisterEmbedInformation = {
["content"] = "@here This Server Needs Sisters Urgently. (If you don't want to be pinged, mute the channel.)",
["embeds"] = {{
["title"] = "**Click here to view their profile**",
["color"] = tonumber(0x2f3136),
["url"] = "https://www.roblox.com/users/" .. Player.UserId .. "/profile",
["fields"] = {{["name"] = "Server Information:",
["value"] = "**Amount of Players:** "..#Players:GetPlayers().."\n**Amount of Staff:** "..CoWorkers
}}
}}
}
local FinalData = HttpService:JSONEncode(NeedSisterEmbedInformation)
HttpService:PostAsync(WebhookURL, FinalData)
end
end