#Floor destroying script help
1 messages · Page 1 of 1 (latest)
is that bad
im new so idk a lot
sure
i havent organised it or anything just experimenting with stuff cuz im new to coding
So the code seems pretty clean. Try to add task.wait(1) at the start of the code so you make sure every part loads in
** You are now Level 2! **
at like the very top of the code?
id say on top of local floors = {}
Oh and also you can add a debug print in the for loop that prints each floor so you can see if they are all added to the table
oh it worked
now it always starts with 2 at the start
tho it still does 1 floor sometimes in the middle
** You are now Level 1! **
u meant like this right>
yeah
i dont really understand why its being inconsistent
like sometimes it works as intended
such as this pic
sometimes it does this 😭

now its stopped
and in the console it says
"All floors have been removed"
weird
the code seems fine so idk
I found the issue
so i remade the script, cleaner
oh
hold up lemme send it rq
and explain it
This part is not needed btw since you remove the floor from the table
why does the script have to be in server script service
That is the whole reason ServerScriptService exists. Plus it's cleaner
theoretically you can have the script inside workspacke but its not good practice
Yeah
For example you have your script inside workspace and the script might not load in fast enough so if you have a variable relative to the script (script.Parent) it may not work.
Not every time but you never know
Try to use game.Workspace instead
alr hold up im trying to reorganise my thing to how you did it
kinda a decent amoumt to take in (new to coding sry)
Don't worry, im not that experienced either xd
Nope
** You are now Level 3! **
for everything floor piece for this
oh really how long you been learning
So i've quit multiple times. But right now id say maybe 2 weeks or something
If you want to learn beginner and advanced scripting i recommend with all my heart BrawlDev's tutorials: https://www.youtube.com/@BrawlDevRBLX
I make videos on Roblox game development! 🤯
My channel pretty much ranges from all kinds of Roblox game development-related stuff and I have a huge list of things I want to do with this channel and the community I want to build!
I'm primarily focused on teaching my viewers how to script on Roblox to create the games that they are passionate...
haha yeaa i've actually been watching him
just finished the beginner tutorial
but i havent really done the final game
for beginner tutorial
i see
tho it hasn't been that long
** You are now Level 2! **
like it took me around 2-3 days to finish beginner
so im still tryna get the hang of tables and stuff
That is great!
its getting much better then when i attempted to learn ts like 3-4 months ago and quit
sort of like learning to reading a book if you get me
Yeah exactly
Right now i've watched most of Brawdevs videos but what im trying to do is try to think of small games and try to map it out in my head how would everything work. If i get stuck or i dont know what functions or events to use i search it up online and learn that function
whats the part = for
: Part lets roblox know that floors[randomFloor] is going to be a part so if you type like selctedFloor. "something" (event or function) you can fill the text with the pop up suggestion
yeaa im not up to that stage yet
but trying to get there soon
it lets you specify what the variable will contain
so its part
same for parameters/arguments
etc
idk what those are yet
but yea i get u
yes
cant you pass pretty much any value in a function
yes
oh thats the maths function stuff he did
brawldev
is the task.wait() at the bottom meant to be empty
It waits one frame of the game
but it doesnt interrupt the rest of the code
A frame passes by really quick <1s prolly
in order for the script to work do i need to rename floors to just parts
Long story short it prevents the loop from crashing the game
What is blud doing
Nope
?
this error is coming up
not sure why that happens
is it happening to you
nope
i may of done smth wrong with my structure
cuz the parts arent going orange/red either
** You are now Level 3! **
alr now the codes all good and all
thoo
how do i remove 2 parts at once
how do i make it so 2 floors get removed
at same time
thats kinda the main issue i was having in the first place
i couldn't get it to remove 2 floors consistently
without bugging out and removing 1
or just completely not removing
yep
does this work?
for me yeah
it should work for you too
@dawn lark btw are you trying to make a game or what?
nah not atm
what im doing rn is experimenting to get a decent amount of knowledge
then im going to either put myself up for hire for free
or think of game ideas to try get myself to make stuff i got no idea on how to
Oh i see. good luck!
wbu
I'm trying to think of a game idea but i cant think of anything
so your trying to make a game?