Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How would I return the players name with the highest Value?

Asked by 4 years ago
Edited 4 years ago
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?

0
Anything that requires the server for e.g. Values you will need a remote event. JesseSong 3916 — 4y
0
? Feroxidus 83 — 4y
0
I was talking about "return" Feroxidus 83 — 4y

Answer this question