So, I'm trying to find the difference between the player who sent the FireServer request, and all other players in the server to check if they are within 300 studs, I tried this but I recieved the error bad argument expected string got table.
local repStorage = game:GetService("ReplicatedStorage")
local remote = repStorage.Remotes:WaitForChild("senseRemote")
remote.OnServerEvent:Connect(function(player)
for i, v in pairs("game.Players:GetChildren()")
do
local inRange = (player.character.HumanoidRootPart.Position - v.Character.HumanoidRootPart.Position).magnitude
if inRange < 300 and v.Team.Value ~= player.Team.Value then
remote:Disconnect(player)
end
end
end)

3 comments
I will be adding more code after the in Range statement so changing the format completely won't work for what I need.
I think the player.Team doesn't need a ".value" after it ALSO remove the " between game.Players:GetChildren() (in the loop)
Thanks