-
What do you want to achieve? Keep it simple and clear!
I want my player to be able to have pylons be added to their character at their discretion. The pylons are meant to mount to their character at a very specific point. -
What is the issue? Include screenshots / videos if possible!
The pylons when instantiated spawn mid air far from the character even after giving some delay to move the pylon to the character model.

It should look like this
-
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
Ive tried using part.CFrame = part2.CFrame
Ive tried using :SetPrimaryPartCFrame(part.CFrame)
but none of these work…
local AssignEvent = game.ReplicatedStorage.TSFWeapons.ServerEvents.WeaponAssign
local RS = game:GetService("ReplicatedStorage")
local GunPylon = game.ReplicatedStorage.GunPylon
local MeleePylon = game.ReplicatedStorage.MeleePylon
AssignEvent.OnServerEvent:Connect(function(player,RPName,LPName)
if LPName ~= "Placeholder" then
if LPName == "GWS-9 Assault Cannon" then
local Pylon = GunPylon:Clone()
Pylon.Parent = player.Character
local weld = Instance.new("WeldConstraint")
weld.Parent = player.Character.LeftPylon
weld.Part0 = player.Character.LeftPylon
weld.Part1 = Pylon.HumanoidRootPart
wait(.1)
Pylon:SetPrimaryPartCFrame(player.Character.LeftPylon.CFrame)
Pylon.Hardpoint.Value = "L"
end
local LP = RS.TSFWeapons:FindFirstChild(LPName):Clone()
LP.Handle.AssignedHardpoint.Value = "LP"
LP.Parent = player.Backpack.Hardpoints.LP
end
if RPName ~= "Placeholder" then
if RPName == "GWS-9 Assault Cannon" then
local Pylon = GunPylon:Clone()
Pylon.Parent = player.Character
local weld = Instance.new("WeldConstraint")
weld.Parent = player.Character.RightPylon
weld.Part0 = player.Character.RightPylon
weld.Part1 = Pylon.HumanoidRootPart
wait(.1)
Pylon:SetPrimaryPartCFrame(player.Character.RightPylon.CFrame)
Pylon.Hardpoint.Value = "R"
end
local RP = RS.TSFWeapons:FindFirstChild(RPName):Clone()
RP.Handle.AssignedHardpoint.Value = "RP"
RP.Parent = player.Backpack.Hardpoints.RP
end
end)
