I'm kind of new to scripting and i wanted to make a detector that detects how close a player is.
When i got this error; "Expected identifier while parsing expression, got >"?
Error is on line 14, where i do the "< lowest" thing <3
local Configurations = {
["Too close"] = 10,
["Close"] = 20,
["Neutral"] = 30,
["Far"] = 40,
["Too far"] = 50,
}
while wait(0.5) do
for k, v in pairs(Configurations) do
local lowest = v - 10
if (HumanoidRootPart.Position - Part.Position).Magnitude <= v and < lowest then
print("Player is ", k)
end
end
end
Help appreciated!

5 comments
You can't evaluate two expressions as a trailing statement. You'll need to compare lowest to the magnitude again.
Oh, can you write your comment as an answer so i can accept.
That's fine, no answer is needed in such a short fix.
Simply store the distance calculated into a variable: local Magnitude = ... then: if (Magnitude <= v) and (Magnitude < lowest).
Thank you sir!