i want a mesh to be rotated to the same position as the part attached to the player’s torso
when i play, it isnt in the correct position
here are examples:
here’s how i want it to look like:
https://gyazo.com/963eac767b0d8812a33aacd7d19fa920
here’s how it turns out ingame:
https://gyazo.com/6b21e7f9f552136a20b9bf9f532e58a1
i don’t really know how to fix it so i haven’t tried anything
this script is in serverscriptservice btw.
game.ReplicatedStorage.Clothing.OnServerEvent:Connect(function(Player)
if Player.Character:FindFirstChild("swordmesh") then
Player.Character:FindFirstChild("swordmesh"):Destroy()
end
local Char = Player.Character
local Hum = Char:WaitForChild("Humanoid")
local HumRP = Char:WaitForChild("HumanoidRootPart")
local Torso = Char:WaitForChild("Torso")
local sword = script:WaitForChild("swordmesh"):Clone()
sword.Parent = Char
local Weld = Instance.new("Weld",Torso)
Weld.Part0 = Torso
Weld.Part1 = sword
sword.CFrame = Player.Character.Torso.SwordPart.CFrame
end)
if anyone is wondering what the clothingevent is its just an event fired when the character is added.
there seem to be no errors in the output so its very confusing.
help appreciated!