This has been an issue for the past 5 years and I haven’t found a solution to the problem yet, anyone has a way to work around this?
Ok, there is a way i use and its pretty good, try welding parts in the player limbs, then you can edit them with PhysicsService, here is a working example of what you want to achieve.
I would like to know if your script is Server or Local, this one i made is Local and works perfect.
local Debris = game:GetService(“Debris”)
local Players = game:GetService(“Players”)
local LocalPlayer = Players.LocalPlayer or Players.PlayerAdded:Wait()
local Backpack = LocalPlayer:WaitForChild(“Backpack”)
local PlayerGui = LocalPlayer:WaitForChild(“PlayerGui”)
local PlayerScripts = LocalPlayer:WaitForChild(“PlayerScripts”)
local Character = LocalPlayer.Character or LocalPlayer.CharacterAdded:Wait() or workspace:FindFirstChild(LocalPlayer.Name)
local Head = Character:WaitForChild(“Head”)
local Torso = Character:WaitForChild(“Torso”)
local Humanoid = Character:WaitForChild(“Humanoid”)
local HumanoidRootPart = Character:WaitForChild(“HumanoidRootPart”)
local RightLeg = Character:WaitForChild(“Right Leg”)
local LeftLeg = Character:WaitForChild(“Left Leg”)
local RightArm = Character:WaitForChild(“Right Arm”)
local LeftArm = Character:WaitForChild(“Left Arm”)
function Limbs(Object, CFrame0)
local Weld = Instance.new("Weld")
Weld.Name = Object.Name
if Object.Name == "RightLeg" then
Weld.Parent = RightLeg
Weld.Part0 = RightLeg
Weld.Part1 = Object
Object.Parent = RightLeg
Weld.C0 = CFrame0
Object.CollisionGroupId = 5
elseif Object.Name == "LeftLeg" then
Weld.Parent = LeftLeg
Weld.Part0 = LeftLeg
Weld.Part1 = Object
Object.Parent = LeftLeg
Weld.C0 = CFrame0
Object.CollisionGroupId = 5
elseif Object.Name == "Head" then
Weld.Parent = HumanoidRootPart
Weld.Part0 = HumanoidRootPart
Weld.Part1 = Object
Object.Parent = HumanoidRootPart
Weld.C0 = CFrame0
Object.CollisionGroupId = 2
else
Weld.Parent = HumanoidRootPart
Weld.Part0 = HumanoidRootPart
Weld.Part1 = Object
Object.Parent = HumanoidRootPart
Weld.C0 = CFrame0
end
end
local FakeHead = script:WaitForChild("FakeHead"):Clone()
Limbs(FakeHead, CFrame.new(0, 1.5, 0))
Remember you have to create the parts with the limb sizes!
Yes, I have found a solution, Change humanoid State to 11.
I was thinking of simplifying this a bit using the pre-established functions by PhysicsService.
local PlayerCollision = true -- CHANGE THIS IF YOU WANT COLLISION FALSE
local PhysicsService = game:GetService("PhysicsService")
PhysicsService:CreateCollisionGroup("Players")
PhysicsService:CollisionGroupSetCollidable("Players", "Players", PlayerCollision) -- Toggles Collision
game:GetService("Players").PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
for _, part in ipairs(character:GetChildren()) do
if part:IsA("BasePart") then
PhysicsService:SetPartCollisionGroup(part, "Players")
end
end -- Sets Limbs to Collision Group
character.ChildAdded:Connect(function(part)
if part:IsA("BasePart") then
PhysicsService:SetPartCollisionGroup(part, "Players")
end
end -- Sets Any Added Parts to the Collision Group
end)
end) -- Fired on CharacterAdded Event
Yes, thats pretty good aswell! But i dint knew you can set collision in a non collidable part with PhysicsService