I am cloning fake arms in the server so that I can set the collision group of the arms to false since it has a humanoid.
MakeFakeArms.OnServerInvoke = function(P)
local FakeArms = ReplicatedStorage:FindFirstChild("ViewModel"):Clone()
for i, Parts in pairs (FakeArms:GetDescendants()) do
if Parts:IsA("BasePart") then
PhysicsService:SetPartCollisionGroup(Parts, "FakeArms")
end
end
return FakeArms
end
ViewModel = MakeFakeArms:InvokeServer()
print(ViewModel) --nil
if ViewModel then
ViewModel.Parent = Camera
--does stuff
end
But the problem is that it doesn’t return the FakeArms in the client does anyone know why this could be happening?
I think it’s because Instances parented to nil don’t replicate. Your new cloned model is never parented to something other than nil, so it appears as nil on the client.
Judging by the code, you are trying to make viewmodel arms? If so, shouldn’t this cloning just be done on the client?
It is supposed to be on the client but I decided to do it on the server so I can set the Collision group to false because of a bug that flings me out of the map. I didn’t want to set the parent of the arms because otherwise people would see the arms
The Viewmodel contains a humanoid which automatically sets every part’s CanCollide to true. For example this is why a roblox character can push another roblox character without colliding through it. Also I need the humanoid so that the arms can have clothing in it.