I basically have a check to check if the players value is 3. If it is 3 it should kick them, but it’s not working. No errors are being produced either.
The code is in a script located in serverscriptservice
Code:
local value = game.Players.LocalPlayer.Stats.Warnings
value.Changed:Connect(function()
if value.Value == 3 then
game.Players.LocalPlayer:Kick("3 Warnings")
end
end)