So I made a little anti cheat kinda thing so that if you launch a remote and you're not on a list you're kicked. I have 2 remotes and 1 script handling them. The scripts for receiving are almost 1:1 the same but for some reason the receiver script for the second remote is flagging me as not on the list. This is the code:
RemoteSetter.OnServerEvent:Connect(function(plr, arg1, arg2, arg3)
print("C RCV")
print("Given data:"..plr.Name..arg1..arg2..arg3)
for i=1, #AdminList do
if plr.Name == AdminList[i] then
if arg1 == 1 and arg2 == 1 then
local SCPtrash = game.Workspace.SCP966Con.SCP966:GetChildren()
for i,v in pairs(SCPtrash) do
if v:IsA("Model") then
v.Humanoid.WalkSpeed = arg3
end
end
end
else
print("This is if player is not good")
end
end
end)
This is the script that works Good:
Remote.OnServerEvent:Connect(function(plr, arg1, arg2)
print("C RCV")
for i=1, #AdminList do
if plr.Name == AdminList[i] then
print("All good")
if arg1 == 1 and arg2 == 1 then
local SCP966 = game.Workspace.SCP966Con.SCP966:GetChildren()
for i,v in pairs(SCP966) do
if v:IsA("Model") then
v:MoveTo(Vector3.new(69.11, 5.286, 279.42))
end
end
end
end
end
end
If you have any fixes tell me please.
