Error: Isa is not a valid member of Attachment

Problem

In my physics module, I keep getting this error:

Isa is not a valid member of Attachment "Workspace.Player1.HumanoidRootPart.RootRigAttachment"

Here’s the code:

-- Sets the player character's physics group every
-- time the player's character model loads.
playerService.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(char)
		task.wait(1)
		for _, part in pairs(char:GetDescendants()) do
			if part:IsA("BasePart") or part:Isa("UnionOperation") or
				part:IsA("MeshPart") or part:IsA("IntersectOperation") then
				physicsService:SetPartCollisionGroup(part,
					config.physics.playerCollisionGroup)
			end
		end
	end)
end)

The physics settings:

	-- Physics Settings
	physics = {
		-- Default collision group ID for all parts and players.
		defaultCollisionGroup = "Default";
		-- Collision group name for players.
		playerCollisionGroup = "Players";
		-- Collision group ID for when the player is legitimately ghosting.
		ghostCollisionGroup = "Ghost";
		-- When false, players can walk through each other without interference.
		enablePlayerCollisions = true;
		-- Workspace gravity setting.
		workspaceGravity = 196.2;
	};

Additional Information
This only seems to happen when running a LOCAL server under the Test menu in Studio. It’s fine when running under the Play option or on a live server. I don’t see anything wrong, except that it seems the Roblox changed how collision groups are handled…again.

What I’ve Tried

  • I looked in the documentation and Attachment is a descendent of Instance where Instance:IsA() is defined.
  • Restarting Studio doesn’t fix it.
  • While the test session was running, I type into the command line on the server print(game.Workspace.Player1.HumanoidRootPart.RootRigAttachment:IsA("BasePart")) and it returns false which is the expected result.

This just started happening with the latest update of Studio or so that I’ve noticed. So my guess is that the error message is either spurious or something else is going on.

Any ideas, suggestions, or comments are greatly appreciated.

image
“Isa” for the UnionOperation

1 Like

I use this exact pattern in other places and it’s fine. It’s only here that there’s a problem. I just tried it on the command line with UnionOperation and it also give the expected result of false.

Exactly, your spelling it correctly in the command line but not in the actual code. Its “IsA” not “Isa”

1 Like

It’s IsA not Isa, also you can use BasePart and it should work for all.

1 Like

AAARRRRRrrrrrrrrrrrrrrgggggggggggggggg :face_with_symbols_over_mouth: :face_with_symbols_over_mouth: :face_with_symbols_over_mouth: :face_with_symbols_over_mouth:

I see it now. I’ve been looking and looking at this for the past two hours and I just did not see it.
Sometimes a second pair of eyes helps. What’s strange though is that it’s been like this for some time and the error just now started showing up. Strange.

Yep. Just fixed it and the problem is gone.

Thanks for your help.

Haha no problem. Typos happen.

The BasePart with collision groups is something that I’m going to have to look into later when I have some free time. Trying to get things working after taking my code apart and putting it back together again.

I wanted to mention that part of the problem as to why it would only show up on the local test server and not solo play is due to a bug dealing with events and actors.

You can review that bug report here.

Alright thanks but may I ask how you are a regular?

I’m assuming that you read the bug report, right? The Roblox staff who handle bug-support decided to give me regular trust level because of the quality of the bug reports and feature requests that I have made over time. I follow their format and really explain things.

Well thats quite lucky of you! Thanks for that. And yes I did see the bug report and decided to see if you contact @Bug-Support or made your self.

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