Warn Command error

local GroupId = 5774015
local httpService = game:GetService("HttpService")
local webhookURL = "MyWebhookURLwhichIdontshare"
local minimumRankToUseCommmand = 3
local function ContactER(DiscordMessage)
	local Data = {
		["content"] = DiscordMessage
	}
	Data = httpService:JSONEncode(Data)
	httpService:PostAsync(webhookURL,Data)
end
game.Players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(Character)
		local WarningGui = script.WarnGui:Clone()
		WarningGui.Parent = Character.Head	
	end)

player.Chatted:Connect(function(Message)
	local SplitMessage = Message:split(" ")
	if player:GetRankInGroup(GroupId) >= minimumRankToUseCommmand and SplitMessage[1] == "!warn" then
		local NameOfPlayerToWarn = SplitMessage[2]
		local PlayertoWarn = game.Players:FindFirstChild(NameOfPlayerToWarn)
		local Reason = Message:split(NameOfPlayerToWarn)[2]
		local WarningGuiClone = PlayertoWarn.Character.Head:WaitForChild("WarnGui")
		local currentWarnings = WarningGuiClone.Warnings.value
		currentWarnings.Value = currentWarnings.Value + 1
		WarningGuiClone.WarnLabel.Text = "W"..currentWarnings.Value.." - "..Reason
		if currentWarnings.Value >= 3 then
			ContactER("<@&765289353215606834>, "..NameOfPlayerToWarn.."has been reported for: "..Reason)
		end
	end
end)
end)

When I warn a user the GUI doesnt change text

Whats the error. Also you cannot bind a ui to a players head, use this instead:

WarningGui.Parent = player.PlayerGui

Nevermind, I figured it out. Btw it was a billboard gui so you can put it to the players head.