Hello, so as you some of you know im trying to make a mining game. I am stuck on the caves. Not on the generation mind you, but on the overlapping/“firefighting” blocks. This is so weird and mind boggeling for me because i already have a statement to make this not happen. Sometimes it works, sometimes it does not.
You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Make the blocks not overlap, EVER
-
What is the issue? Blocks overlapping when generating caves. Here’s a gif of blocks overlapping only on caves, for some reason: (the big rectangle is a test script found on the bottom of blockhandler)
Animation - Gifyu (takes a minute to load) -
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I have litterally spent a day trying to figure out this one bug. I have tried so many things i forgot and can’t even list them here.
With all that out of the way, i know what’s wrong with my script but for some reason i can’t fix it. Here are the lines that are wrong: (Like i said, only caves do this)
if orginPosition and SavedPositions[tostring(addedCFrame)] then return end
SavedPositions[tostring(addedCFrame)] = true
Now another answer might be that the cave generation branches off and that can make overlapping blocks. I really, really don’t know.
I’ll link the place here
Stalagmines.rbxl (269.1 KB)
. I’m looking at work of other people to help me so some unrelated files may show up. The one you’re interested for is blockhandler under ServerScriptService.GameScripts.
And i’d like you to ask to please provide useful answers! Obvious but very bad-performance answers like iterating over every block once every block is super slow. I don’t want to quit a project again.