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

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

Asked by
YTGonzo 20
7 years ago

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
0
BTW The error on line 6 was fixed but it still didn't work. YTGonzo 20 — 7y
0
Oops, didn't see this! What does it say in the output? jotslo 273 — 7y
0
If you didn't notice, you wait twice so it'll take 2500 seconds between each burrito spawn. Disillusions 61 — 7y
0
JoshRBX: It does not say anything in the output about this YTGonzo 20 — 7y
View all comments (2 more)
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. jotslo 273 — 7y
0
JoshRBX: I tried using 5 seconds and it still doesn't work . YTGonzo 20 — 7y

1 answer

Log in to vote
0
Answered by
jotslo 273 Moderation Voter
7 years ago

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.

0
Red lines indicate errors plasma_node 343 — 7y
0
The error on line 6 was fixed but it still didn't work. YTGonzo 20 — 7y
Ad

Answer this question