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

The player gets all of the tools instead of getting the one with the most votes?

Asked by
O3hros -3
2 years ago

`while true do repeat wait() until script.Parent.Visible == true local award = game.ReplicatedStorage.Tool local award2 = game.ReplicatedStorage.Tool2 local award3 = game.ReplicatedStorage.Tool3 local v1 = script.Parent.TextValue1.Value.Value local v2 = script.Parent.TextValue2.Value.Value local v3 = script.Parent.TextValue3.Value.Value

repeat wait() until script.Parent.Visible == false

if v2 and v3 <= v1 then
repeat wait() until v1 >= v2 and v1 >= v3
award:Clone()
award:Clone().Parent = game.Players.LocalPlayer.Backpack
    if v1 and v2 <= v3 then
    repeat wait() until v3 >= v1 and v3 >= v2
    award3:Clone()
    award3:Clone().Parent = game.Players.LocalPlayer.Backpack
        if v1 and v3 <= v2 then
        repeat wait() until v2 >= v1 and v2 >= v3
        award2:Clone()
        award2:Clone().Parent = game.Players.LocalPlayer.Backpack
    end
end
end

end`

Answer this question