-- Services
local Teams = game:GetService("Teams")
-- Teams
local TeamsTable = {
SDGetplayers = Teams["Security Department"],
TTFGetplayers = Teams["Tactical Task Force"],
TSGetplayers = Teams["Test Subjects"],
RDGetplayers = Teams["Research Department"],
FPGetplayers = Teams["Facility Personnel"],
RaSDGetplayers = Teams["Repair and Service Department"]
}
-- Values
local EventInProgress = workspace.Values.EventInProgress
-- Alerts
local Alerts = {
[1] = script.Parent.RiotAlert, -- [1] is event number
[2] = script.Parent.BreachAlert,
[3] = script.Parent.WarheadAlert,
[4] = script.Parent.RaidAlert
-- [5] = etc
}
-- Function
local function UpdateTeams()
print("ev=",EventInProgress.Value)
print("Event1")
if Alerts[EventInProgress.Value] then
print("Event2")
local SDNumber = #TeamsTable.SDGetplayers:GetPlayers()
local TTFNumber = #TeamsTable.TTFGetplayers:GetPlayers()
local TSNumber = #TeamsTable.TSGetplayers:GetPlayers()
local RDNumber = #TeamsTable.RDGetplayers:GetPlayers()
local FPNumber = #TeamsTable.FPGetplayers:GetPlayers()
local RaSDNumber = #TeamsTable.RaSDGetplayers:GetPlayers()
print("Event3")
script.Parent.TeamNumberSD.Text = SDNumber
script.Parent.TeamNumberTTF.Text = TTFNumber
script.Parent.TeamNumberTS.Text = TSNumber
script.Parent.TeamNumberRD.Text = RDNumber
script.Parent.TeamNumberFP.Text = FPNumber
script.Parent.TeamNumberRaSD.Text = RaSDNumber
print("Event4")
for _, Alert in Alerts do
if Alert.Visible then
Alert.Visible = false
end
end
print("Event5")
Alerts[EventInProgress.Value].Visible = true
end
end
-- Setup
UpdateTeams()
-- Events
--for _, Team in TeamsTable do
-- Team.Changed:Connect(function()
-- UpdateTeams()
-- end)
--end
EventInProgress.Changed:Connect(UpdateTeams)
Nothing is being outputted except Event1
i changed the code try again …
Nope, Still doesn’t show it somehow.
I mean show the output . . . . . . . . .
Oh uh right, here.
(i filtered it to Events only)
ok. can u show what outputs this
print("ev=",EventInProgress.Value)
Works now, had IT WAS JUST A SINGLE LINE OF CODE that was connected to eventinprogress instead of eventtype
1 Like
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.