What do you want to achieve? Keep it simple and clear!
Get rid of errors
What is the issue? Include screenshots / videos if possible!
Argument 1 missing on nil
What solutions have you tried so far?
nothing.
game.ReplicatedStorage.Remotes.Warrant.OnServerEvent:Connect(function(PlayerCalled, interact, test, field, textBox, comboBox)
if CanCuff(PlayerCalled) then
if game.Players:FindFirstChild(field) then -- problem here
local player = game.Players[field]
if test == "Search Warrant" then
print("Search Warrant")
end
if test == "Arrest Warrant" then
print("Arrest Warrant")
end
while true do
wait(60)
if game.Players:FindFirstChild(field) then
for i,v in pairs(game.Players:GetChildren()) do
if CanCuff(v) then
if test == "Arrest Warrant" then
print("Arrest Warrant")
end
end
end
end
end
else
print("Target must be in game")
end
end
end)
Is it a player or a string? If it is a player, you can check by using if field.Parent then,
otherwise, you’d have to fire Player.Name in your case. Also the error is showing that field is nil, meaning that either it isn’t fired or it is straight up nil.