Hi, I’ve recently ran into an issue when trying to attach custom meshes to players.
I’ve recently created a custom helicopter hat system which constrains a Part to the players’ Head through a HingeConstraint. All I used for that was Instance.new('Part') and changed the size, etc.
I’m now looking at making a jetpack system, and want to attach a custom Mesh to a players torso through a WeldConstraint. Below is my current code. It’s inside ServerScriptService so can show to all clients.
player.CharacterAdded:Connect(function(character)
local torso = character:WaitForChild('UpperTorso')
local jetpack = Instance.new('MeshPart')
jetpack.MeshId = 'rbxassetid://18922176303'
local weld = Instance.new('WeldConstraint')
weld.Part0 = jetpack
weld.Part1 = torso
weld.Parent = jetpack
end)
end)
Expected Behaviour
The mesh welds to the players back displays my custom model.
Reality
Received this error:
What have I tried?
I’ve looked at cloning meshes from ReplicatedStorage but can’t seem to figure it out. I’ve also tried using SpecialMeshes but can’t figure these out either, even after reading the documentation.
I’d be grateful for any help I can get!