Player is jumping when Colliding with another player while non collidable

Hey, I have encountered this issue in the past and I am not sure of how to solve it. More specifically, when using PhysicsService to make the players noncollidable, I have encountered an issue when the player collides with other players. When both players are spawned for the first time, the players’ collision is fine and everything works fine without any issue. When one player resets, it causes the player to jump whenever the player comes into contact with another player. Here is the code I am using to make the player noncollidable with the other players.

The “players” variable is game:GetService("Players"), for anyone wondering.


local physics = game:GetService("PhysicsService")
local collisionGroupId = "SFG453HS"
--setting up
physics:CreateCollisionGroup(collisionGroupId)
physics:CollisionGroupSetCollidable(collisionGroupId, collisionGroupId, false)

--for player anti collide
players.PlayerAdded:Connect(function(player)
	player.CharacterAppearanceLoaded:Connect(function(character)
		local playerInstances = character:GetDescendants()
		for _,x in pairs(playerInstances) do
			if x:IsA("BasePart") then
				print(x.Name .. " | has been added to noclip")
				physics:SetPartCollisionGroup(x,collisionGroupId)
			end
		end
		
		
	end)
end)

Any ideas?

I suspect it might have something to do with the HumanoidRootPart or something like that.

1 Like

Try using the script provided by Roblox to see if anything changes Detecting Collisions | Roblox Creator Documentation.

There’s a several things this code piece does differently, I wonder if it makes any difference.

1 Like

It did not make a difference, the same thing is happening. I think that it might be something other than the Physics Service since I have already tried a couple of scripts from the toolbox, re-written my own script 5 times and tried Roblox’s script.

Well, it looks like I found a solution to the problem. Turns out it was not my script or any other script that was out there. For some unknown reason when using a Virtual Tablet on the Roblox App, it causes the player to jump when they collide with another player. I am not sure why this is happening. I disabled the driver for the Virtual Tablet and it worked fine. To make sure it was the Virtual Tablet, I joined Tower of Misery. on the Roblox App and enabled the Virtual Tablet Driver. I was able to reproduce the issue perfectly. To conclude when Roblox is using Keyboard inputs and Mobiel inputs it messes with the Physics engine and makes the player Jump when colliding with another player while using PhysicsService. This only works on the Roblox App from the Microsoft Store, to my knowledge.

Thank you to everyone who helped to solve this issue.