Today, i was try make a sword on back but the torso cframe act completely odd. i try setting the SetPrimaryPartCFrame and changing the weld to WeldConstraint. which didn’t work.
RemoteEvent.OnServerEvent:Connect(function(player,AssetFunction,AssetName)
assert(typeof(AssetFunction) == "string","Error This Is not a String")
assert(typeof(AssetName) == "string","This is Not A String")
local Character = player.Character or player.CharacterAdded:Wait()
if AssetFunction == "Equip" then
local AssetFound = nil
local success,failed = pcall(function()
AssetFound = handleWeaponsFolder:FindFirstChild(tostring(AssetName))
end)
if success and Character and Character:FindFirstChildWhichIsA("Humanoid") then
local BodyPartFind = Character:FindFirstChild(Configuration:WaitForChild("BodyPartName").Value)
local CloneAsset = AssetFound.Handle:Clone()
AssetFound:SetPrimaryPartCFrame(Character.Torso.CFrame)
CloneAsset.Parent = Folder
local WeldContance = Instance.new("WeldConstraint",BodyPartFind)
WeldContance.Name = CloneAsset.Name
WeldContance.Part0 = CloneAsset
WeldContance.Part1 = BodyPartFind
else
warn("Couldn't find" .. tostring(AssetName))
end
end
end)
oh, I fix that promblem. but im still getting the same original promblem I had where the CloneAsset Cframe = torso cframe but it in a very odd position
alright, soo im cloning the model and placing it inside of the character inside a folder. im trying to weld the model/mesh part but the torso cframe completely act different. the model/meshpart is suppose to be inside of the character torso rather than this.
The only thing that I can think of is that the player moves between the time that the sword is moved and when the weld is created. Maybe try creating the weld before you move the sword?