Some trouble regarding PhysicsService collision groups

  1. What do you want to achieve? I’m making a plot-base building game and I am currently scripting the permissions. The permission I’m having trouble with is the Blocked permission. I want the blocked players to not be able to enter the player’s plot.

  2. What is the issue? For some reason it just lets the player go through the plot as well as enter it. I don’t want that.

  3. What solutions have you tried so far? Nothing.

        PhysicsService:RegisterCollisionGroup("Border")
		PhysicsService:RegisterCollisionGroup("Player")
		
		for i, border in ipairs(PlayerPlot.Value:GetChildren()) do
			print("Loop")
			if border:IsA("BasePart") then
				border.CollisionGroup = "Border"
			end
		end
		
		for _, bodypart in ipairs(Character:GetChildren()) do
			print("Loop2")
			if bodypart:IsA("BasePart") then
				bodypart.CollisionGroup = "Player"
			end
		end
	
		PhysicsService:CollisionGroupSetCollidable("Border", "Player", true)

Apologies for the incorrect indentation.

1 Like

I should also mention that the borders of the plots in the game are non-collidable. Not sure if that helps or not.

1 Like

bumping the post hehe aughhhhhhhhh

1 Like