I’m trying to attach a part with a mesh on it to the RightUpperLeg but i seem to be having issues finding a solution, Any help?
local Part = YOUR_PART -- // SET THIS BY YOURSELF // --
local RightUpperLeg = Character:WaitForChild("RightUpperLeg")
local Weld = Instance.new("Weld", Part)
Weld.C0 = RightUpperLeg.CFrame:ToObjectSpace(Part.CFrame)
Weld.Part0 = RightUpperLeg
Weld.Part1 = Part
Weld.Enabled = true
Can you show me a gif, or the current script you are using?
game.Players.PlayerAdded:Connect(function(Player)
Player.CharacterAdded:Wait()
local Character = Player.Character
local Part = workspace.EquipedKnife -- // SET THIS BY YOURSELF // --
local RightUpperLeg = Character:WaitForChild("RightUpperLeg")
local Weld = Instance.new("Weld", RightUpperLeg)
Weld.C0 = Part.CFrame:ToObjectSpace(RightUpperLeg.CFrame)
Weld.Part0 = RightUpperLeg
Weld.Part1 = Part
Weld.Enabled = true
end)
EquipedKnife Exists in workspace.
is the knife anchored, and i don’t think you positioned the knife next to the leg, but instead inside.
The knife isn’t anchored, The script is the same in studio as shown above.
Only if the knife actually spawns inside the player leg
Which it doesn’t it stays at the same position lol.
Can you open the contents of the RightUpperLeg after running the script and see if a weld is there, and show me the properties
Sure thing, Hold up a second ill try looking for the weld
There is a weld spawning inside of the part but Part0 is empty.
Try this
local Part = YOUR_PART -- // SET THIS BY YOURSELF // --
local RightUpperLeg = Character:WaitForChild("RightUpperLeg")
local Weld = Instance.new("Weld", RightUpperLeg)
Weld.C0 = RightUpperLeg.CFrame:ToObjectSpace(Part.CFrame)
Weld.Part0 = RightUpperLeg
Weld.Part1 = Part
Weld.Enabled = true
Found a solution heres the script ( P.S its set to head as a test )
game.Players.PlayerAdded:Connect(function(Player)
Player.CharacterAdded:Wait()
local Character = Player.Character
local Part = workspace.EquipedKnife -- // SET THIS BY YOURSELF // --
local RightUpperLeg = Character:WaitForChild("Head")
Part.Position = RightUpperLeg.Position
local Weld = Instance.new("Weld", Part)
Weld.C0 = RightUpperLeg.CFrame:ToObjectSpace(Part.CFrame)
Weld.Part0 = RightUpperLeg
Weld.Part1 = Part
Weld.Enabled = true
end)