-
What do you want to achieve?
I want to use a variable that I set in this table, in another portion of the table. -
What is the issue?
The issue is that there is an unknown global “PoliceSystem”, when I try this:
local PlayerSelectorMenuObjectClone = PoliceSystem.Objects.PlayerSelectorMenuObject:Clone()
-
What solutions have you tried so far?
I’ve looked on the DevForum to see if people had the same issue as me, but nobody seems to have similar issues.
local PoliceSystem = {
["Settings"] = {
DeveloperMode = true, -- Leave as "false" at all times unless testing in studio!
ArrestDetainEvaders = true,
},
["Objects"] = {
-- GUIs
PlayerDetaineeObject = script.Parent.DetaineeGUI,
PlayerSelectorMenuObject = script.Parent.SelectedPlayerGUI,
PlayerArrestedObject = script.Parent.ArrestedGUI,
-- Scripts
PoliceSystemManager = script,
PlayerSelectorScript = script.Parent.PlayerSelector,
PoliceSystemEventHandlerScript = script.Parent.PoliceSystemEventHandler,
-- Events
PoliceSystemEvent = script.Parent.PoliceSystemEvent
},
["Logging"] = {
DetainEvaderArrestTime = 900,
DetainEvaderArrestingOfficer = "Server"
},
["Access"] = {
["Teams"] = {
["Police"] = Teams["Military Police"],
["Headquarters"] = Teams["Marine Headquarters"]
},
["Groups"] = {
["MPC"] = {
["GroupID"] = 17023204,
["RequiredGroupRank"] = 1
},
["Headquarters"] = {
["GroupID"] = 32726961,
["RequiredGroupRank"] = 1
}
},
["Users"] = {
["TooLongIdling"] = 52381317,
}
},
["Functions"] = {
["PlayerSelection"] = function(player, argument_1)
if argument_1 == nil then
if Players[player].PlayerGui.PlayerSelectorMenuObject then
Players[player].PlayerGui.PlayerSelectorMenuObject:Destroy()
end
else
if not Players[player].PlayerGui.PlayerSelectorMenuObject then
local PlayerSelectorMenuObjectClone = PoliceSystem.Objects.PlayerSelectorMenuObject:Clone()
end
end
end,
["Detaining"] = function(player, argument_1)
end,
["Arresting"] = function(player, argument_1)
end,
}
}
return PoliceSystem