I’ve noticed this happen in a few roblox games. For some reason when I first join my game I can push people over and they fall on my client even though for them they are still standing. Does anyone know a fix to this? My game uses a script to disable character collisions, I’m not sure if it is related but here it is anyways:
local PhysicsService = game:GetService("PhysicsService")
PhysicsService:CreateCollisionGroup("CharGroup")
PhysicsService:CollisionGroupSetCollidable("CharGroup", "CharGroup", false)
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(char)
local children = char:GetDescendants()
for i = 1, #children do
if children[i]:IsA("BasePart") then
PhysicsService:SetPartCollisionGroup(children[i], "CharGroup")
end
end
char.DescendantAdded:Connect(function(part)
if part:IsA("BasePart") then
PhysicsService:SetPartCollisionGroup(part, "CharGroup")
end
end)
end)
end)
This behavior sometimes occurs when you’re loading into a game because there is a very high amount of latency between your client and server, which essentially means the server doesn’t replicate everything to your client for a short period of time (example PhysicsService isn’t replicated so you can just push people over on the client).
I’d recommended just making a loading screen to let the server load everything onto your client (I presume you’re trying to load a bunch of datastores or assets or anything like that upon a player joining, make a function to wait until they’re loaded).
This issue seems to be happening even minutes after a user joins a game. It will effect any players that haven’t moved/walked after the moment that I joined the game no matter how much time passes, so I don’t believe a loading screen would resolve the issue.
Notice how anyone you run into here will fall over
I’m not sure if this is related but I was also experiencing this issue in the game recently: Character not spawning in
where the player’s character wouldn’t load in and it would just be frozen even though CharacterAutoLoads was enabled. My workaround was to fire a remote event from the client when joining and then call :LoadCharacter from the server if the character doesn’t spawn after a couple seconds.
I cannot see anyone falling over, and when testing the script, everything works perfectly fine.
It might be caused by network latency in terms of movement. This means the communication between the client and the server has a slight delay, causing inconsistencies in the player’s position and movements.
Thus, it could be causing the falling over, but that is just a far-out guess.
If you’re reading this because you’re having the problem, here is the solution I’ve found.
On the client side, when you join the game add a BodyVelocity and BodyAngularVelocity with (0,0,0) direction vectors inside of all the other characters rootparts in the game, and also the new players that join after you as well. This will prevent them from being pushed or tipped over by locking them in place. Then just use Humanoid:StateChanged() to detect when to remove the BodyVelocity and AngularVelocity from the character so that it removes them as soon as their character starts moving which is when the physics replication seems to automatically fix itself.