Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Random Items System Won't Work, Why???

I am trying to make a random items spawning system and did some test with one item but it didn't work Please Help.

local LootNodeBurrito = workspace.LootNodeBurrito
local Items = game.ReplicatedStorage.Items

function SpawnBurrito()
-- Burrito lol :)
local Burrito = game.RepicatedStorage.Items.Burrito:Clone()
Burrito.Parent = workspace
if game.Workspace.LootNodeBurrito.LVValue.Value == "Burrito" then
Burrito.Position = LootNodeBurrito.Position
wait(1250)
Burrito:Destroy()
end
end

while true do
    SpawnBurrito()
wait(1250)
end

6 comments

0

BTW The error on line 6 was fixed but it still didn't work.

0

Oops, didn't see this! What does it say in the output?

0

If you didn't notice, you wait twice so it'll take 2500 seconds between each burrito spawn.

0

JoshRBX: It does not say anything in the output about this

0

Are you sure 2500 seconds is what you want? Have you tried experimenting with other periods of time? 2500 seconds is 41 Minutes 40 Seconds.

0

JoshRBX: I tried using 5 seconds and it still doesn't work .

1 answer

You have misspelled ReplicatedStorage on Line 6. You must always make sure that your spellings are accurate when scripting. Check for any lines that get placed underneath, as these indicate that there is a problem.

2 comments

0

Red lines indicate errors

0

The error on line 6 was fixed but it still didn't work.

This discussion is preserved as it was. New answers, comments, and votes are closed.