[EDIT] Why is my AntiCheat not working? Seems to give a very sus Error
Asked by
4 years ago Edited 4 years ago
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 (table 1 ) |
03 | local charName = table 1 [ 1 ] |
04 | local speedVal = table 1 [ 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