CollisionGroup doesn't Work!

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

  1. What do you want to achieve? Keep it simple and clear!
    -I’m trying to add collision group to each part of the player character once it loads for the character don’t collide with the dropped parts in my tycoon. The issue is that it only work in Roblox Studio test but doesn’t work in Roblox Player.

  2. What is the issue? Include screenshots / videos if possible!
    -Once the character its loaded the event call a function that assign the collisiongroup to the parts of the character.


  3. What solutions have you tried so far? Did you look for solutions on the Creator Hub?
    -I tried to add a little wait once the character its loaded but it doesn’t work, I tried to use the event “Player.CharacterAdded” and it doesn’t work either, I added prints to check if the function its called once the character its added but the print only run in Roblox Studio, I checked the console in Roblox Player and I can’t see it only the print of another scripts and idk what to do.

Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.

I know that, Well i already solved it, I just made the character be saved in a variable with wait() because the function was not called with the “CharacterAdded” event or “CharacterAppearanceLoaded” event.

game.Players.PlayerAdded:Connect(function(player)
	local character = player.Character or player.CharacterAdded:Wait()

	if character then
		for _, part in ipairs(character:GetDescendants()) do
			if not part:IsA("BasePart") then continue end
	
			part.CollisionGroup = "NoPlayerCollision"--set collisionGroup
		end
	end
end)

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