I tried using a RunService.Stepped loop to set the arms to have collision, which worked, but not when colliding with other players.
Collides with the wall for the local player
Other players and NPCs
CanCollide is true for both models on the server, but false for the other player on the client, so it isn’t replicating to the client properly. Yes, I put the loop in a server script.
Please help
Thanks for the answer, but please explain how collision groups would help me here? I can see how they would if you were trying to, say, make the head have no collision, but arms already have no collision, and collision groups don’t force collision.
Look into collision groups. In the mean time, the following may work.
local Game = game
local Players = Game:GetService("Players")
local RunService = Game:GetService("RunService")
local function OnRenderStep()
for _, Player in ipairs(Players:GetPlayers()) do
local Character = Player.Character
if not Character then continue end
for _, Child in ipairs(Character:GetChildren()) do
if not (Child:IsA("BasePart")) then continue end
if not (string.match(Child.Name, "Arm$") or string.match(Child.Name, "Hand$")) then continue end
Child.CanCollide = true
end
end
end
RunService.RenderStepped:Connect(OnRenderStep)