Making this game and for the last few months theres been an awful bug plaguing the game. It appears to be physics related, but i have no other leads aside from that. It prints nothing, things return rapidly as if nothing had broken, its wild.
In this video you can see an example of what the bug looks like from two perspectives. One being while seated/welded to the disappearing parts, and two being witnessing the parts disappear in large random chunks.
Its gotta be something relating to welds maybe? I first assumed it was something that had to do with weird CFrame camera issues but it clearly wouldn’t be judging by how it pulls you into the abyss if you’re attached to it. Roblox did recently get some changes to occlusion culling so maybe its that? As far as i know you can’t disable that feature and i dont have streaming enabled on either.
please. help.
Edit:
Issue still not fixed. But in the process of trying to fix it, I’ve made a decent tool for avoiding NaN values. NaNWall
Edit Edit:
wasn’t welds, just replaced them all and its still happening. I cant recreate this issue in studio no matter how hard i try, so theres really nothing i can do. This issue has been going on for ~5 months now and its absolutely exhausted me, so unless someone has a fix for it im just not developing this game any futher. I’ll add a any clips i can find of the bug to help as best I can.
as you can see, it effects all parts within that corner of the world; welded or not. So its clearly not a case of constraints. It also has nothing to do with the character controller, a while back i patched out all possible NaN value occurances.
the character has to do with the character, not the entire map, and the character only bugs out when its been welded to said parts. please at least read the post, have actual educated input to give, you are the exact reason i dread using the devforum for anything.
It looks like a NaN error since you mentioned it’s physics related and stuff goes disappearing and missing, lighting goes crazy as well. I’ve had a similar experience with making stuff with vector force acceleration and drag.
You could try printing out position and velocity values with a NaN check and using a tool to lower fps since physics bugs often happen at low fps.
if (n ~= n) then
print("is nan!!")
end
Yep dev forum isn’t that great better to network and ask a dev directly or do it yourself.
Unfortunately I realized I can’t help everyone and that I could be getting paid to do this kind of stuff.
had a developer friend suggest the same thing, we have a few checks for nan values in the character but its pretty much impossible to recreate the issue so i havent found a good way to patch it. I think the weirdest part is that parts disappear in large chunks which is why i believe its weld related. Its also all serverside
Hmm, well with all bugs first thing to do is to try to consistently recreate the issue.
The NaN bug I linked was also roblox engine related with humanoid:Move() sometimes even the engine itself doesn’t check for NaN errors. If you are using constraints perhaps a value was NaN there as well like .Force = NaN, NaN, NaN I’ve seen something odd with my vectorforce spring suspension before.
Perhaps you can intentionally NaN a value and see what happens?
How are you welding the items? Through a script or using WeldConstraints?
Are all the Parts involved in the same Model, or are they all just in the Workspace?
Please copy/paste the section of code to show us exactly how are you moving the Parts in your code. Also include sections of code that tell us how the variables used in the moving section are set.
Speaking of welds since you are making a building game try deleting inactive welds and as you say perhaps too many welds are causing an issue? It could be because 1 weld becomes inactive and active somehow and then another weld becomes active which has a different C0 and C1 internal data and causes weird teleportation effects.
all placed objects are cloned, parented to a folder in the workspace, set to a cframe, then they do an area check around them to any neighboring parts and weld to them.
Do you keep doing this multiple times?
Once they are welded (and unanchored) they shouldn’t disappear at all unless your code is moving them around.
Click on one of them during testing and watch the Properties to see if it stays in the workspace. If it doesn’t that means your script is probably cloning it over and over and replacing it. If it stays in hte workspace you’d be able to see it’s Position which would give you an idea of where it’s teleporting to…
Buddy, I’ve worked on games with custom characters before. The character was clipping through an unanchored/welded part and it flinged it across the map, this was a guess, no need to be a **** about it
What fixed it for me is my blood system, I used blood engine for the blood, and somehow some why when setting the bloodtype to “decal” some parts just disappeared. Changing it back to default fixed it for me.
Again, I hope this helps you, this is really frustrating.
final bump for this. i just went through and converted all welds to prismatic constraints hoping that welds were the issue, but its still happening. so unless anyone has an idea on how to fix this i’m not developing this anymore lol
Again, click on one of the Parts while it’s happening and watch to see if it’s Position or CFrame is moving, or if it’s getting deleted and added back in.
This may point you in the direction of a script that’s handling the objects.
I just realized I hadn’t watched the second video. It looks like you’ve got a LOT of stuff going on in the game. Particles, lots of MeshParts, blood, and other stuff that might just be overloading your graphics card.
Why are you welding the items and not just anchoring them?