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

Trying to get a range of numbers, but NumberRange.new isnt working?

Asked by 6 years ago

Okay so in my game when you die a bag spawns where you died and it gets cloned to workspace as well as a folder getting created inside repl storage.

The folder and the bags name are a "Player.Name .. " " .. Deaths.Value" so its your name then a space then the amount of deaths you have, this way I can keep track of certain bags so like death #56's bag.

I have a billboard gui that is supposed to only appear over objects that have a hitbox and are in the table but I am trying to get any death bag in workspace into the table basically.

But since your death bag name depends on how many deaths youve had I tried using a NumberSequence and it isnt working.

Heres the script, if you have any questions please ask, I know its kinda hard to understand, its because its also hard to explain.

local ItemTable = {"Campfire"}
local CraftingItemTable = {"Campfire"}
local LootingTable = {}

for i, Players in pairs(game.Players:GetChildren()) do
    local DeathRange = NumberRange.new(0, 5000)
    ItemTable[2] = Players.Name .. " " .. DeathRange
    LootingTable[1] = Players.Name .. " " .. DeathRange
end

Thank you for your time.

0
A number range is used by particles it has nothing to do with what you are trying to do. You need to calculate the value per player. User#5423 17 — 6y
0
Why would they add that in and not let everything use it GottaHaveAFunTime 218 — 6y
0
I just want a number range GottaHaveAFunTime 218 — 6y
0
So you want a random number from a min value and a max value? Like I said it is used for particle emmiters. User#5423 17 — 6y
View all comments (3 more)
0
Yeah GottaHaveAFunTime 218 — 6y
0
If its so hard to explain then don't make the question please. Also NumberRange is nothing but a container of two numbers read the wiki. cabbler 1942 — 6y
0
Nah Cabbler I ask what I want. GottaHaveAFunTime 218 — 6y

Answer this question