local function FindTarget() for i, v in pairs(otherPlayers) do if v.Team ~= player.Team then local otherTool = v.character:FindFirstCHildWhichIsA("BackpackItem") if otherTool.Name == "PlasmaSaber" then if otherTool == true then local magnitudes = (v.Positon - player.Position).magnitude < 30 then for i, v in pairs(magnitudes) do local lowest = 0 if v <= lowest then lowest = v
I haven't added any of my 'ends' yet, however I want to return the player with the lowest value to where I called it, any guidance on how I would do this? Also if there's a more efficient way to do what I'm attempting how would I optimize it?