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.