[Solved] MeshParts not getting set to collision group

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? I want all BaseParts (Parts and MeshParts) to have their collision group set to “GroupTeam”.

  2. What is the issue? Only instances with the type of “Part” get their their collision group set to “GroupTeam”

  3. *What solutions have you tried so far? *I tried fixing my if statement by trying to chane it to:

if descendant:IsA("Part") or descendant:IsA("Meshpart) then
-- Function
if descendant:IsA("Part") then
-- Function
if descendant:IsA("Meshpart) then
-- Function
local PhysicsService = game:GetService("PhysicsService")
local Players = game:GetService("Players")
local Teams = game:GetService("Teams")

Players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(character)
		if player.Team == Teams["Choosing..."] or player.Team == Teams.Immigrants then
			return
		end
		for _, descendant in character:GetDescendants() do
			if descendant:IsA("BasePart") then
				descendant.CollisionGroup = "GroupTeam"				
			end
		end
	end)
end)
2 Likes

Adding player.CharacterAppearanceLoaded:Wait() does not fix the issue, so it does not seem to be that the Meshes take longer to load.
The character I’m using is the Man package (Man - Roblox)

I have isolated the script and have found out that it was an issue with another script (a morph script) because it was editing some parts at the same time. I solved it by creating a bindable event with gets fired by the morph script once it is done.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.