Following an angry warning from my console yelling at me:
SetPartCollisionGroup is deprecated, please use BasePart.CollisionGroup instead. More info: https://devforum.roblox.com/t/updates-to-collision-groups/1990215
I’ve replaced all instances with BasePart.CollisionGroup = "".
The warning disappeared, meaning I’ve covered all instances.
When trying to set the collision group of a player’s character I’ve used the following code:
local function SetCharacterCollisionGroup(character)
for i, v in ipairs(character:GetChildren()) do
if v.ClassName == "CharacterMesh" or v.ClassName == "ShirtGraphic" then
v:Destroy()
elseif v:IsA("BasePart") then
print("SET", v.Name)
v.CollisionGroup = "Player"
end
end
end
The word “Set” prints 7 times in the console, with the correct BasePart following after it. However, when viewing its properties during runtime, the CollisionGroup is still “Default”.
I’ve tried turning setting .Archivable to true to no avail.
Why doesn’t the script work? It’s in a serverscript, and when pasting into the console, it WORKS.
Can you press Ctrl+Shift+F, then do a global search for SetPartCollisionGroup? It should show you any instances of SetPartCollisionGroup that you haven’t removed