#Spawn
1 messages · Page 1 of 1 (latest)
I have this script i made that has a 50/50 chance to spawn a noob or a roblox npc. But the script doesn't work.
Can anybody help me?
?
50/50
i mean if the number printed is correct then it should spawn a roblox npc or a noob
its 1 in 255
what are you trying to do then
spawn an npc with math
task.spawn is a budget coroutine
it does not spawn anything, it allows "Multithreading"
ohh
i cant see ur spawn event but thats probably where its lacking
so what should i put instead?
reference where the original part is, then clone it
local function handleSpawn()
local randNum = math.random(1, 2)
if randNum == 1 then
-- spawn the noob
elseif randNum == 2 then
-- spawn roblox npc
end
end
while task.wait(2) do
handleSpawn()
end
are you trying to do something like this?
wdym force?
your script is also very confusing
its a 1in 255 chance to spawn, so even if u had the right code youd have to wait a few minutes for it to work
didn't he say he wanted 50/50?
well you need to ask what you need help with properly
fr