Rotating welds help


I want to rotate my katana so it isn’t sticking in to me like this:
image

local Players = game:GetService("Players")

Players.PlayerAdded:Connect(function(Player)
	wait(3)
	print("Done")
	
	local Katana = game.ServerStorage.Katana:Clone()
	Katana.Parent = Player.Character
	
	
	local Weld = Instance.new("Weld")
	Weld.Parent = Katana
	Weld.Part0 = Katana
	Weld.Part1 = Player.Character.Torso
	Weld.C0 = (CFrame.new(-0.5, 0, 0)) * CFrame.Angles(math.rad(0), (1.55), -1)
end)

i recommend you position it how you want it in studio and then use the command bar to find its offset to the torso

[in command bar]

print(workspace.DummyTest.Torso.CFrame:Inverse() * workspace.Katana.CFrame)

then in the script

Katana.CFrame = Torso.CFrame * CFrame.new(whatever the command bar said)
local weld = Instance.new("Weld")
weld.Part0 = Katana
weld.C0 = katana.CFrame:Inverse()
weld.Part1 = Torso
weld.C1 = Torso.CFrame:inverse()
2 Likes

wouldn’t your torso have to be the same rotation or the katana would be rotated weirdly?

The print line is supplying you with the CFrame based off the Rotation of the Torso.
Try it.

1 Like