So, my game, Battle for ROBLOX, has developed an interesting little quirk. Occasionally, when minions spawn into the game, players are… ‘merged’ with them. Now the issue here is very strange. Visually, nothing changes. You don’t see yourself move to become one with a minion and neither do any of the other players. However, when the game asks for your position, it seems to think you’re merged with that minion. Your skills happen from that location, you’re targeted by enemy turrets in that location (particularly frustrating when you merge with an enemy minion, which spawns under an enemy turret), and moving doesn’t seem to do anything to fix it.
Now, I’ve checked through the code. The only way that I find a character’s position is by directly returning their Root’s position. I use an object oriented framework, so it’s doing something like ‘return self.Root.Position’ to find this. I have a couple of theories as to what’s going on:
Somehow, upon the creation or cloning of welds inside of the minion, the server welds your character to the minion without replicating any of the changes. Eventually, since character changes aren’t filtered, your client fixes that change. You also don’t see yourself move because of this.
Somehow my object-oriented inheritance tree is going wonky. For some reason, the Hero instance loses track of its personal ‘Root’ index and uses Character’s, which is for some reason set to… the most recent minion’s ‘Root’ index?
Somehow neither of these seem very likely, though. The first just has a lot of holes in it and the second… well, why would the Hero instance lose its ‘Root’ index? And why would the Minion instances set Character’s ‘Root’ index? It just doesn’t make sense.
Has anyone experienced something similar to this? This presents a huge stability problem with my game which prevents the full release and promotion of my game.
I really would if I could, I’ve been tearing out my hair about this for a while now because its inconsistent. In addition, the repro might not be able to be basic, as it could be a problem with my entire inheritance tree. Really what I’m looking for in this thread is anyone else who has experienced this problem.
Again, I’m not sure if this is on the engine. And, like I said, I’ve been trying for a couple weeks now to repro this in my game but I can’t find a consistent method. It’s just elusive. It does, however, seem to only happen when played online.
This is probably a joint issue. I’ve had this happen before when failing to GC joints from JointsService, leading to too big a buffer (mind you, this happened per a player as I parented joints locally, and then didn’t GC). Some sort of optimization starts joining welds in weird ways.
It probably only happens online because
When in TestSolo you don’t accumulate enough welds
It happens with characters because that’s a majority of welds happen with charaters
Probably something to do with the spanning true constructed in terms of the root joint being hackily injected
Next time this happens in the game, try printing out the number of active joints in the game server. If it’s way high, this is your issue.
Another thing you can try is spamming a ton of joints into the JointsService (which were previously attached) and see if that repros it.
Ah, it could be because each time a character spawns I locally create a weld to hold a part above the characters’ heads in order to show their health bar. Does this sound likely to you, @Quenty?
So here’s some progress and I really need your guys’ help because this hundreds of hours of work will literally mean nothing if I can’t fix it.
First of all, I have guaranteed that there are no Part0-less and Part1-less joints of class Weld or Motor6D entering Workspace or JointsService. That doesn’t happen at all. Is there another class I should look for?
Second, I have confirmed that the problem is not in my inheritance tree. I had the Hero class put a block on where it thought the HRP was. I had a completely-out-of-the-inheritance-tree script put a block on where it thought the HRP was. When merges happened, both blocks moved. Interestingly, on everyone’s screen the character does not appear to move, and on the victims screen you can move normally (but it’s not actually happening/replicating).
I thought this was due to a ball I was welding to the minions to prevent them from knocking each other over in the event of a punch, but it is in fact not that. At all. I took it out. And it still broke.
So it is guaranteed to be a physics bug. I really, really need to find a way to fix this. I literally can’t publish this game while this bug is in there. Do you guys have any ideas? I’m clean out.
Yeah, this is definitely a ROBLOX bug. And a long-running one, too. @radiogamer’s game about a year ago had random objects weld to the player; sometimes you’d spawn with a minecart on your head, for example.
That may be it, I’m not certain yet. It could be the parts that I’m welding in order to show indicators above peoples’ heads (because, for some god-forsaken reason, StudsOffset doesn’t actually work).
EDIT: I take that back. Just went through my code – I don’t actually weld those anymore. I CFrame them on RenderStepped. So it must be the HumanoidRootParts welding together. This is on the server, too, because I now know I don’t make any joints locally only.