[Repub] why is my anticheat not working?, gives really sus error.
Why Is my Code not working? This fires an remote event:
2 | local Char = script.Parent |
3 | local Speed = Char.Humanoid.WalkSpeed |
5 | table.insert(Tbl, Char.Name) |
6 | table.insert(Tbl, Speed) |
7 | game.ReplicatedStorage.AntiCheatLab:FireServer(Tbl) |
And this is the Code that recieves it:
01 | local Replicate = game.ReplicatedStorage.AntiCheatLab |
02 | Replicate.OnServerEvent:Connect( function (tbl) |
03 | local charName = tbl [ 1 ] |
04 | local speedVal = tbl [ 2 ] |
05 | local PlLoad = game.Players:WaitForChild(charName) |
06 | local ChLoad = game.Workspace:WaitForChild(charName) |
07 | local CharObj = game.Workspace:WaitForChild(charName) |
08 | if CharObj.Humanoid.WalkSpeed ~ = speedVal then |
09 | game.Players [ charName ] :Kick( "===" ) |
Error
1 is not a valid member of Player "Players.Ferrarimami" - Server - Script:3