I have no clue why this is not working I get no errors?
--Service's.
local ControllerService = game:GetService("ControllerService")
--"ControllerService" Instance's.
local RemoteEvent = ControllerService.RemoteEvent
--"MainGui" Instance.
local MainGui = game:GetService("Players").ScriptKiddXen.PlayerGui.MainGui
--"VICTORY_COUNT" And "DEFEAT_COUNT".
local VICTORY_COUNT = 0
local DEFEAT_COUNT = 0
--Checking If There Has Just Been A "VICTORY" Or "DEFEAT" When You Join.
if MainGui.EndMatch.Visible and MainGui.EndMatch.Result.Text == "VICTORY" then
VICTORY_COUNT = VICTORY_COUNT + 1
RemoteEvent:FireServer("chatted", "Good Game! (x" .. VICTORY_COUNT .. ")")
elseif MainGui.EndMatch.Result.Text == "DEFEAT" then
DEFEAT_COUNT = DEFEAT_COUNT + 1
RemoteEvent:FireServer("chatted", "Bad Game! (x" .. DEFEAT_COUNT .. ")")
end
--Checking If You Have Had A "VICTORY" Or "DEFEAT" And Adding 1 To "VICTORY_COUNT" Or "DEFEAT_COUNT" Everytime.
MainGui.EndMatch.Changed:Connect(function(Changed)
if Changed == "Visible" and MainGui.EndMatch.Visible ~= false then
if MainGui.EndMatch.Result.Text == "VICTORY" then
VICTORY_COUNT = VICTORY_COUNT + 1
RemoteEvent:FireServer("chatted", "Good Game! (x" .. VICTORY_COUNT .. ")")
elseif MainGui.EndMatch.Result.Text == "DEFEAT" then
DEFEAT_COUNT = DEFEAT_COUNT + 1
RemoteEvent:FireServer("chatted", "Bad Game! (x" .. DEFEAT_COUNT .. ")")
end
end
end)

