It has recently come to my attention that when I used a non-block avatar in my game, the motor6D parts attached to my legs attach for a split second and disappear. I have a script that attaches skis to my feet when it detects that a player has joined which usually have no issue in the default blocky avatar. But say I use the man body package or the jester equinox package, the skis attach for a fraction of a second and instantly get deleted from the game. What is going on?
Here is the script (server script)
game:GetService("Players").PlayerAdded:Connect(function(player)
-------------------------------------------------------------Randomize
player.CharacterAdded:Connect(function(character)
local RightFoot = character:WaitForChild("RightFoot")
local LeftFoot = character:WaitForChild("LeftFoot")
local RightHand = character:WaitForChild("RightHand")
local LeftHand = character:WaitForChild("LeftHand")
---Clones
local Ski1 = script.Skis:Clone()
local Ski2 = script.Skis:Clone()
local Pole1 = script.SkiPoles:Clone()
local Pole2 = script.SkiPoles:Clone()
---Parenting
Ski1.Parent = character
local Ski1PrimaryPart = Ski1.PrimaryPart
Ski2.Parent = character
local Ski2PrimaryPart = Ski2.PrimaryPart
Pole1.Parent = character
local Pole1PrimaryPart = Pole1.PrimaryPart
Pole2.Parent = character
local Pole2PrimaryPart = Pole2.PrimaryPart
---Warning Check
if not Ski1PrimaryPart then
warn("Ski1 does not have a PrimaryPart set!")
return
end
if not Ski2PrimaryPart then
warn("Ski2 does not have a PrimaryPart set!")
return
end
if not Pole1PrimaryPart then
warn("Pole1 does not have a PrimaryPart set!")
return
end
if not Pole2PrimaryPart then
warn("Pole2 does not have a PrimaryPart set!")
return
end
---Motor Set
local motor1 = Instance.new("Motor6D")
motor1.Name = "RightFootMotor"
motor1.Part0 = RightFoot
motor1.Part1 = Ski1PrimaryPart
motor1.C0 = CFrame.new(0, -0.15, 0)
motor1.C1 = CFrame.new(0, 0, 0)
motor1.Parent = RightFoot
local poleMotor1 = Instance.new("Motor6D")
poleMotor1.Name = "RightHandMotor"
poleMotor1.Part0 = RightHand
poleMotor1.Part1 = Pole1PrimaryPart
poleMotor1.C0 = CFrame.new(0, -0.15, 0) * CFrame.Angles(math.rad(-90), 0, 0)
poleMotor1.C1 = CFrame.new(0, 0, 0)
poleMotor1.Parent = RightHand
local motor2 = Instance.new("Motor6D")
motor2.Name = "LeftFootMotor"
motor2.Part0 = LeftFoot
motor2.Part1 = Ski2PrimaryPart
motor2.C0 = CFrame.new(0, -0.15, 0)
motor2.C1 = CFrame.new(0, 0, 0)
motor2.Parent = LeftFoot
local poleMotor2 = Instance.new("Motor6D")
poleMotor2.Name = "LeftHandMotor"
poleMotor2.Part0 = LeftHand
poleMotor2.Part1 = Pole2PrimaryPart
poleMotor2.C0 = CFrame.new(0, -0.15, 0) * CFrame.Angles(math.rad(-90), 0, 0)
poleMotor2.C1 = CFrame.new(0, 0, 0)
poleMotor2.Parent = LeftHand
end)
end)