Parts self destroying after character spawned

So shortly regarding what I’ve got when I developed
What happened
As I just returned from vacation, I returned to the development as well. And during the development process when I was building and scripting stuff, I clicked “Play” and parts below me just disappeared right after character spawned. This is like they’re begone although there’s no single script which contacts with these parts at any point.
Solutions I’ve tried
I’ve tried to set those parts position to 0, 0, 0 and see if it was just rendering issue or anything else. It didn’t work.
I’ve tried making parts smaller and set spawn-location of player through scripts and just spawn-locations. Neither worked, parts just begone right after I clicked “Play”.
I’ve tried migrating my game to another experience, like save file then re-upload it as a new game, didn’t work.
I also joined the roblox experience itself (not in studio), the parts self-evaporated themselves here as well.

I looked through whole devforum and the only thing I got is that’s a studio bug or my software bug, although my laptop is good enough, and the studio is freshly installed.
Some fun stuff
ISSUE.rbxl (154.0 KB) << this is file for y’all if you want to see what happens for you.

<< this is how it looks from my side in studio. Parts are just becoming non-colliding for no reason.
<< this is how it looks from side, my character just falls.

So shortly what I need is;

  • Figure out why it happens, the parts having own life.
  • Find the solution for it.

From what I can tell, there’s supposed to be some sort of filter here that should make it so getResources is only called for parts that are supposed to be collectible. Right now your code just destroys any part that isn’t called “SPAWN_BLOCKER” whenever a character touches it.

for _, prop in pairs(Workspace:GetDescendants()) do
	if prop:IsA("BasePart") and prop.Name ~= "SPAWN_BLOCKER" then
		prop.Touched:Connect(function(hit)
			if hit.Parent:FindFirstChild("Humanoid") then
				getResources(hit.Parent, prop)
			end
		end)
	end
end
1 Like

Ohh, thanks G.

I guess I wasn’t aware when I made that function because I was sleepy. But thanks for the solution.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.