#INFINITE PARTS SPAWNING

1 messages · Page 1 of 1 (latest)

mossy rain
#

#1020374354867007528 YES I USED CHATGPT AND ITS NOT WORKING IDK WHATS THE REASON -- Variable to control spawning
local isSpawning = false

-- The main loop to continuously spawn and destroy the kill brick
while true do
if not isSpawning then
isSpawning = true -- Prevent spawning multiple times

    -- Clone the part (script.Parent)
    local newKillBrick = script.Parent:Clone()

    -- Get the position of the spawner
    local spawner = game.Workspace.Win1.Spawner

    -- Set the position of the new part to the Spawner's position
    newKillBrick.Position = spawner.Position

    -- Parent the new part to the workspace
    newKillBrick.Parent = game.Workspace

    -- Wait for 3 seconds before destroying the new part
    wait(3)

    -- Destroy the new part after 3 seconds
    newKillBrick:Destroy()

    -- Wait for 5 seconds before starting the next cycle (no new spawn yet)
    wait(5)

    -- Allow spawning again
    isSpawning = false
end

end
IT SPAWNS INF PARTS AFTER ITS DESTROYED HERES MY GOAL: make a script where the part spawns for 3 seconds and then it gets destroyed and it repeats like a loop you know so i wait 5 seconds before its spawned again but it somehow spawns inf parts when its destroyed

sick gazelle
#

💀

#

average gray role beggar

mossy rain
#

it spawns inf parts when its destroyed

#

help

vagrant egret
mossy rain
mossy ploverBOT
#

studio** You are now Level 1! **studio

mossy rain
#

yall are not helping bro

sick gazelle
#

no shit bro

#

we wont help someone with an ai script

mossy rain
#

bro i only used ai to help me with debugging

#

then how else am i suppose to learn if i cant debug

#

i used my reasources and it didnt work

mossy rain
#

bro i even searched yt and theres no videos for it

sick gazelle
#

google, docs, devforum, practice :/

mossy rain
#

how else am i suppose to know whta to do

#

i did use devforums

sick gazelle
mossy rain
#

and theres nothing to help me

sick gazelle
#

there wont be a tutorial for everything

mossy rain
#

then explain why is there multiple parts spawning whenever its destroyed

#

i dont understand the logic behind it

sick gazelle
#

you would if you made the script yourself (:

#

lemme look at it rq

sick gazelle
#

straight dogwater

mossy rain
#

i used while true do

#

and then i used the location of the spawner

#

and then i make it clone

#

and then wait 3 seconds before its destroyed

#

and then wait 5 seconds to spawn it again

#

somehow it dont work

sick gazelle
#

oh

#

i know why

mossy rain
#

why

sick gazelle
#

youre cloning the part which has the script inside of it

mossy rain
#

yea

sick gazelle
#

so youre creating multiple scripts

mossy rain
#

isnt that how its suppose to work

#

OOHH

sick gazelle
#

which clone stuff

#

again

mossy rain
#

THATS WY

sick gazelle
#

and agian

#

infnity

mossy rain
#

ok ill fix it

sick gazelle
#

yea

mossy rain
#

thank you man

sick gazelle
mossy rain
#

can you help me make a data storage to save walkspeed

#

its super complicated to save walkspeed

glad kite
mossy rain
mossy rain
#

@sick gazelle i got a question

#

How would i make a script keep track of leaderstats named "Wins" value

#

like make an part do stuff if they got a certain amount of wins

#

like for example they got 10 wins

#

that means they can go thru the part

#

but if not then the part will be cancolide set to true

#

How would i code that

sick gazelle
#

You can make it so whenever the part is touched, the script checks if the "Wins" value of the player is >= 10, if it is then make the part not collidable
Do this in a Script with RunContext set to Client, which is the same as a localscript except that it can run in workspace

mossy rain
#

Will i need to make a remote function?

mossy ploverBOT
#

studio** You are now Level 2! **studio

sick gazelle
#

No need

mossy rain
#

So your saying only a local script will handle it

sick gazelle
#

Its not safe, but again people can just tp their way through if theyre cheating anyways, having a part as a door isnt super safe either

mossy rain
#

Wait, what do you mean its not safe

#

like it would break my code?

#

like break the other scripts

sick gazelle
#

Exploiters can pass through it

mossy rain
#

Oh

sick gazelle
#

But even if it was safe, exploiters can just tp to the other side anyways

#

so it doesnt really matter

mossy rain
#

Yeah

#

no one will cheat in my shitty ass game

#

but i just wanna learn

#

how to do it

sick gazelle
#

real

mossy rain
#

so

#

local script only right?

sick gazelle
#

A normal script with runcontext set to client

#

which is the same as a localscript except it runs on workspace

mossy rain
#

whats a runcontext

sick gazelle
#

so yes

sick gazelle
#

of scripts

mossy rain
#

Idk what that is

#

explain simpliar terms

#

like where its located

sick gazelle
#

On the properties tab lol

mossy rain
#

do i put it inside of the part

sick gazelle
#

You can

mossy rain
#

But how would a server script handle all the players wins

#

Like

#

if one player has 10 wins

#

then wont the script just make the door pass thru

#

since that one player has that amount of iwns

sick gazelle
#

Its a local script

mossy rain
sick gazelle
#

Look

#

Go to roblox

#

Insert a normal script

#

and set the runcontext to client

#

youll see how it turns into a "local script"

mossy rain
#

how do i set it to a client script

#

do i right click on the script?

sick gazelle
#

....

#

Set the runcontext to client

#

Its on the properties tab

mossy rain
#

oh

#

i never knew that existed

#

woah dude

sick gazelle
#

Which is why i told you 4 times lol

mossy rain
#

ok

#

so

#

what does turning this on exactly do

sick gazelle
#

It makes the script run on the client, which is the same thing local scripts do

#

Except that these can run in Workspace

#

unlike local scripts

mossy rain
#

Oh

#

thats useful

sick gazelle
#

Yeah

mossy rain
#

ima test it

mossy rain
#

omg its working

#

now my game can work

#

this game is gonna get 1k players active

sick gazelle
mossy rain
sick gazelle
#

3 years of trying to make stuff and if i dont know something i look it up

#

tables are super cool btw

mossy rain
#

ive been scripting longer than you 😂

sick gazelle
#

at least in RSC

mossy rain
#

all i could make in the past 4 years was just changing transpercy

#

bro yess its actually working

#

ive added the extra stuff

#

and its working

#

by the way

#

whats the difference between runcontext legacy and server

#

@sick gazelle

sick gazelle
#

legacy is just server but it doesnt run everywhere

mossy rain
#

whats the best thing u made @sick gazelle

sick gazelle
mossy rain
#

its cool and all but how will that mechanic be used in games

sick gazelle
#

its a random dungeon generator

#

so it can be used to randomly generate maps

#

i just made it flat and slowed it down so i could showcase it

#

without the slowing down it does it in less than a second

mossy rain
mossy ploverBOT
#

studio** You are now Level 3! **studio

sick gazelle
#

The fuck do you mean

mossy rain
sick gazelle
mossy rain
sick gazelle
#

To do what exactly

mossy rain
#

to spawn a random map

sick gazelle
#

Ah yes

#

Because having every single possible fucking variation of all sizes is wayyyy more efficient

#

Totally wouldnt have to store tens of thousands of maps

mossy rain
#

Put the maps in a folder

sick gazelle
#

Yes, put 100k+ different maps in a folder

mossy rain
#

yup

sick gazelle
#

Are you stupid

mossy rain
#

Where else your gonna put it

sick gazelle
#

Nowhere

mossy rain
#

your gonna put it in workspace or sum

sick gazelle
#

I generate them in runtime

mossy rain
#

bro you have to think like me

sick gazelle
#

Bro

mossy rain
#

The most easiest way is to get a script that clones

sick gazelle
#

THIK

#

Think

mossy rain
#

making a generator is weird unless you wanna be fancy

sick gazelle
#

Bricked think

mossy rain
#

im out thinking you

sick gazelle
#

Is storing 9000000+ parts in REPLICATEDSTORAGE

#

good

mossy rain
#

yup

sick gazelle
#

9 fucking million

mossy rain
#

put it in a folder

sick gazelle
#

Oh youre dumb im blocking you

mossy rain
#

its not going anywhere

#

its in replicated storage

#

its not gonna be spawned into workspace for you too see

#

only way its gonna be out is if you move it

sick gazelle
#

Dawg

#

Do you not get that its insanely laggy

mossy rain
#

how is it gonna be laggy

#

Ohhh

sick gazelle
#

YOURE MF REPLICATING 9 MILLION PARTS

mossy rain
#

thats true

#

your kinda right

sick gazelle
#

omg crying

mossy rain
#

but if you have a good pc you can handle it

sick gazelle
#

The crazy thing is youd need to make the generator anyways to make those 100k+ maps

#

So its pointless

mossy rain
#

How does a map have 9 million parts

#

not possibke

sick gazelle
#

Every maps has a bunch of parts

#

Depending on size

#

Im talking every map

mossy rain
#

ok

sick gazelle
#

Every possible map in every size you need

#

The hallway gen is random, the room gen is random, the mf doors are random

mossy rain
#

ooh

sick gazelle
#

So many possibilities

mossy rain
#

so you wanna make a random map generator

#

should of just said that

sick gazelle
#

Did i not say that???

mossy rain
#

but how would that work

mossy rain
#

U said to generate a map u made

sick gazelle
#

A script

mossy rain
#

reply to the video pls

mossy ploverBOT
#

studio** You are now Level 4! **studio

sick gazelle
#

Thanks rizz

#

Anyways i can send you the code later if you wanna see it

mossy rain
#

did you make thag script your self

sick gazelle
#

But its 4am rn

sick gazelle
mossy rain
#

what does s2 rank mean

sick gazelle
#

Scripting 2

mossy rain
#

ooh

#

how do u unlock scripter

sick gazelle
#

Its why im red with 2 arrows

mossy rain
#

rank

mossy rain
#

what do u have to do

sick gazelle
#

read da channel

mossy rain
#

It says no ai but how would u get help then

sick gazelle
#

google

#

Ai is trash for scripting

#

Never use it

#

Im typing on mobile sorry

mossy rain
#

it gives me good scripts

#

google doesnt know what it’s talking about

sick gazelle
#

Doesnt understand past the basics

#

And it

#

Its bad for edits

mossy rain
#

what if you give it code to debug it

sick gazelle
#

Especially bad

sick gazelle
mossy rain
#

bro thinks im dumb

sick gazelle
#

To actually understand your code

mossy rain
#

i understand everything

sick gazelle
mossy rain
#

if u give me code for something ill read it easily

mossy rain
#

thats a clasd

#

class

sick gazelle
#

Bad

#

A class in scripting bro

#

Not in gaming

#

Although theyre similar in some aspects

mossy rain
#

Its an section

#

wait i got a question

#

what if you know the basics of coding

#

But

#

you dont know what to put next

#

so the code doesnt work

#

what would you do

#

like if you don’t know what to put next

sick gazelle
#

Youre not giving me much context here, but if its something like a variable i dont know how to get i look it up in devforum and the docs

mossy rain
#

ok so look

#

Hypothetically

#

if ur hypothetical a new scripter

#

and know how to read code

#

but dont know what to put

#

but you do the functions

#

but dont know how to organize it in a way it works

#

Like if you miss a step in your code but dont realize

#

or something like that

#

but then you dont know whats causing the error

sick gazelle
#

Yes, the amazing process of "doing the functions" youre not giving me much context.
But from what im observing, theres a big differencw between knowing how to read code and how to write it. Reading isnt as sensitive as writing

mossy rain
#

so you listen to the people saying dont use ai and look on forums but theres no forums available

#

so your stuck on code that you dont know what to put

sick gazelle
#

How do you not know, you can always traceit back to something... look up the erroe in google

mossy rain
#

so you type random things

#

ok bro

#

like for example

#

if i wanna clone something from replicated storage

#

It clones

#

but

#

where would i set the position

#

witjout making a part

sick gazelle
#

The map is a model?

mossy rain
#

Yeah

sick gazelle
#

"How to move model roblox"

#

Google

mossy rain
#

no way u called me a goofy

sick gazelle
#

Thats the answer to the problem

#

Its what i would do if i didnt know how to

mossy rain
#

bro

#

let me give u a better example

#

like for example

#

your doing code

#

you wanna make a combat system

#

but dont know where to start

#

what would you do

#

like how would u contuine a code you start but dont mess it up

#

because u dont know whats next

sick gazelle
#

I would try to sketch a flowchart describing the processes i need to write, the communication between server-client, inputs, modules, etc. That way i have a solid view of the system

sick gazelle
#

Dont memorize code, its pointless

mossy rain
#

thats what i do

#

I try to guess what a person do next in a yt turorial

#

but i get it wrong

#

and when i try to do it my self

#

i mess it up

#

and dont know what to put

sick gazelle
# mossy rain thats what i do

Which makes it so you dont actually understand how to code. You know what the code you memorized does, but not why a lot of stuff happens

#

Why is this in parenthesis?

#

Why do i use this keyword here?

mossy rain
#

thats why i use ai to tell me

sick gazelle
#

What does "local" mean?

mossy rain
#

hro

#

bro

#

u think im that dumb

#

To not know whats local

sick gazelle
mossy rain
#

variable

sick gazelle
#

No

mossy rain
#

bro yes

sick gazelle
#

You can define a variable without local

mossy rain
#

you can call it anywjere in the script

#

bru yk what i mean

sick gazelle
#

Local just makes it so that the variable can only be accesed within the scope of where its defined

#

So not anywhere in the script

mossy rain
#

you giving me high vocab terms

sick gazelle
#

It makes the variables local

mossy rain
#

ik how to use it

#

just

#

tell me

#

how to

#

make scripts

sick gazelle
#

Thats the point

mossy rain
#

Bro then explain without saying algebra

sick gazelle
mossy rain
#

broooooooo

#

babe

sick gazelle
#

Thats all i can tell you, its how i learnt scripting and why im here today

mossy rain
#

how do u understand roblox physics

sick gazelle
mossy rain
#

wait

sick gazelle
#

I know how client ownership of physics and physics steps work

mossy rain
#

can i ask u question

sick gazelle
#

And thats about it relating to that topic

sick gazelle
mossy rain
#

what does local function really mean

#

i understajd it

#

but not that well

#

cuz

#

U put code

#

in it

#

and then u call that piece of
Code

#

in the script

#

Am i right

sick gazelle
#

In essence, were just defining a variable of the type 'function'

mossy rain
#

like for exanple

#

local function skibiditoilet()

sick gazelle
#

And local makes it so it can only be accesed within the scope of where its defined

mossy rain
#

Yeah

#

do i got
The idea right

sick gazelle
#

Then you name the function and

#

Within the parenthesis you define the parameters

mossy rain
#

im kinda confuse on the parenthisis

mossy ploverBOT
#

studio** You are now Level 5! **studio

mossy rain
#

like really confuse

#

cuz idk whqt to put

#

in the paranthesis

sick gazelle
mossy rain
#

because

#

for connect function touch part

#

the parathesis

#

were for the base part

sick gazelle
#

Ok stop

#

Im on mobile so i cant write an example but

mossy rain
#

same

sick gazelle
#

The parameters are simply the input of a function

#

No more

#

No less

mossy rain
#

what do I put

#

in the parathesis

#

like idk what to type

sick gazelle
#

Now, what we do when we use the :Connect() function is we reference the function as a parameter of :Connect(), not call it

#

What the fuck bro

#

This is why youre still s0

mossy rain
#

bro

sick gazelle
#

You dont want to understand

mossy rain
#

ur saying stuff

#

out of my vocab

sick gazelle
mossy rain
#

that i dont understabd that well

#

like for parameters i barley undestand what that mean

sick gazelle
#

Im using as basic a vocab that i can without saying wrong things

mossy rain
#

ok

sick gazelle
mossy rain
#

ok

#

then what about local function

sick gazelle
#

Im going to sleep ok? Its 4 am, maybe ask someone else for now...

mossy rain
#

wait

#

wait

#

plsnanswer

#

this last questin

sick gazelle
#

Lemme reply

mossy rain
#

what about local function

#

you said

#

the input of the function

#

but since local function doesnt have

#

a inpUt

#

then what would it be

#

in the parathesis

sick gazelle
mossy rain
#

ok

mossy rain
#

im talking about paean thesis

#

paramthesis

#

in the parenthesis

sick gazelle
#

If you do, something or somethings

mossy rain
#

Give an example of when would put it

#

Also

sick gazelle
#

Mobile

mossy rain
#

when you call the function

#

like skibiditoilet()

#

in the code

#

what do u put

#

in the parathesis

sick gazelle
#

The input parameters lol, look

#

local function cutFruit(fruit)
--stuff
end

local myFavorite = "Apple"

cutFruit(myFavorite)

mossy rain
#

ohhhhhh

#

but then

#

how would it work

sick gazelle
#

So now inside the function "fruit" means myFavorite

#

We input Apple as the fruit to cut

mossy rain
#

This is so confusing

sick gazelle
#

Mood

mossy rain
#

like

#

do u not see how confused i am

#

bro

sick gazelle
#

Theyre very simple in reality, if i could explain better i seriously would

mossy rain
#

what wouod cut fruit (myfavorite) do

#

if u make a function that cuts the fruit

#

wait

#

ohhh

#

it cuts the apple

#

it cuts the type of feuit

#

Am I right

sick gazelle
#

It would run the code in the function, where "fruit" means the one that you inputted

sick gazelle
mossy rain
#

tomorrow teach me about module scripts

sick gazelle
#

No

mossy rain
#

i have no idea how to use them

#

Why

sick gazelle
#

Too complex for you still

#

You need prior knowledge

mossy rain
#

Tell me how i would use it

#

And how to make it work

sick gazelle
#

"Stop treating me like a baby"
"Stop using vocab i dont know"

#

The fuck do you want

mossy rain
#

Teach me

#

🙏

sick gazelle
mossy rain
#

whats a table

sick gazelle
mossy rain
#

is it like dividing table

sick gazelle
mossy rain
#

when can i

sick gazelle
sick gazelle
#

Dictionaries

#

Services

#

Client Serverr maybe

mossy rain
#

when i used while true

#

it gave my pc a blue screen

#

when i ran it for my game

sick gazelle
#

lmao thats what you get for not reading the big yellow warning in the docs

mossy rain
#

i was testing to see how to fix something

sick gazelle
#

Well gn

mossy rain
#

whats a big yellow warning

#

No way you leave me on a cliff hanger

sick gazelle
#

Its a warning

#

Thats yellow

#

And big

mossy rain
#

where

sick gazelle
#

In the docs

#

Of loops

mossy rain
#

Bro

sick gazelle
#

The roblox docs

mossy rain
#

it never gave me that in the script

sick gazelle
#

Yeah thats on you

sick gazelle
#

Whatever

#

Good Night

mossy rain
#

Where do i geg that

sick gazelle
#

Fucking google them

#

Developer API reference

#

Thats what theyre called

mossy rain
#

Ok

#

go sleep

#

why u even up at 5 am

sick gazelle
#

Because of you babe

mossy rain
#

thats hot

sick gazelle
#

Fr

#

Gn

mossy rain
#

when do i call u

#

K ping me when u up

sick gazelle
#

yes

mossy rain