How to straighten a model?

So I’m making a sword skill for someone and for some reason the model won’t go straight. Instead its facing upwards and to the side.
This is what happens:

https://gyazo.com/0c117555cc013a73799da38f2065ba9a

Here is my script:

local Player = game.Players.LocalPlayer
	local Character = Player.Character or Player.CharacterAdded:Wait()
	local Humanoid = Character:WaitForChild("Humanoid")
	local IdleAnim = Humanoid:LoadAnimation(script.Parent.Idle)
	local Swing = Humanoid:LoadAnimation(script.Parent.Attack)

script.Parent.Equipped:Connect(function(Mouse)
	
	local m = Instance.new("Motor6D", Character["Right Arm"])
	m.Part0 = Character["Right Arm"]
	m.Part1 = script.Parent.Handle
	IdleAnim:Play()
	print("Hi")
	Mouse.Button1Down:Connect(function()
		Swing:Play()
		wait(1)
		game.Workspace.GroundEffect.PrimaryPart = game.Workspace.GroundEffect.BaseRing
		game.Workspace.GroundEffect:SetPrimaryPartCFrame(script.Parent.Tip.CFrame)
	end)
end)

Edit: I know its not server sided right now, I’ll do that later.

If the angle offset is consistent, you can do something like this:

local angleOffset = CFrame.Angles(0, math.rad(90), 0)
game.Workspace.GroundEffect:SetPrimaryPartCFrame(script.Parent.Tip.CFrame * angleOffset )

This rotates the CFrame by a fixed amount.

1 Like

It now aims downwards, should I keep changing the angles until its correct?
https://gyazo.com/8c83f69c8eadb14f870a302912f91c27

Yes, try playing around with the angles until it looks right.

1 Like