of     1   

DarkBlox456
#221323138Friday, July 14, 2017 7:11 PM GMT

collision filtering is quite new to me, so sorry if i sound like rubbish. with this script, i disable collisions between players when a player enters the game: local physics = game:GetService("PhysicsService") local pcollide = "Players" local ocollide = "Player" physics:CreateCollisionGroup(pcollide) physics:CreateCollisionGroup(ocollide) physics:CollisionGroupSetCollidable(pcollide, pcollide, false) game.Players.PlayerAdded:connect(function(plr) plr.CharacterAdded:connect(function(char) setCollisionGroupRecursive(char) end) end) function setCollisionGroupRecursive(object) if object:IsA("MeshPart") then physics:SetPartCollisionGroup(object, pcollide) end if object:IsA("Part") then physics:SetPartCollisionGroup(object, pcollide) end for _,child in pairs(object:GetChildren()) do setCollisionGroupRecursive(child) end end and with this script, i create another collision group to enable player collisions to whoever is in the created collision group when a text button is pressed: local plr = script.Parent.Parent.Parent.Parent.Parent local char = game:WaitForChild(plr.Name) local physics = game:GetService("PhysicsService") local pcollide = "Players" local ocollide = "Player" script.Parent.MouseButton1Click:connect(function() physics:CollisionGroupSetCollidable(ocollide, ocollide, true) setCollisionGroupRecursive(char) function setCollisionGroupRecursive(object) if object:IsA("MeshPart") then physics:SetPartCollisionGroup(object, ocollide) end if object:IsA("Part") then physics:SetPartCollisionGroup(object, ocollide) end for _,child in pairs(object:GetChildren()) do setCollisionGroupRecursive(child) end end end) the problem is that the player collisions are still disabled, which probably means they havent been added to the collision group where it enables player collisions, since both scripts dont give off any errors. any help? thanks.
Pinkerten
#221324424Friday, July 14, 2017 7:28 PM GMT

Players are set to default collide even if you change it, idk about grounds tho
DarkBlox456
#221324520Friday, July 14, 2017 7:29 PM GMT

no this all works, except when enabling player collisions again. they stay disabled for some reason which is confusing me.
Pinkerten
#221326849Friday, July 14, 2017 7:58 PM GMT

Just set them into a "Default" collosion group taht collides wiht everthyuhyting
DarkBlox456
#221328879Friday, July 14, 2017 8:25 PM GMT

they're still a part of the collision group where it disables player collisions, so i dont think i can move them to other groups
DarkBlox456
#221348924Friday, July 14, 2017 11:37 PM GMT

bump.

    of     1