Welded Part Not Facing upright

https://gyazo.com/5875b647a9f13691d5789c0dec30f534 When you first use the tool its upright, which is how its supposed to be, but then flips over

script.Spin.OnServerEvent:Connect(function(plr)
    char = plr.Character
    Torso = char.Torso
    tornado = game.ReplicatedStorage.TOOLS.Tornado:Clone()
    wield = Instance.new("Weld")
    tornado.CFrame = Torso.CFrame
    wield.Part0 = Torso
    wield.Part1 = tornado
    wield.C0 = Torso.CFrame:Inverse()
    wield.C1 = tornado.CFrame:Inverse()
    wield.Parent = tornado
    tornado.Parent = game.Workspace
    tornado.CFrame = tornado.CFrame * CFrame.Angles(0,0,-20.4)
    tornado.CanCollide = false

end)

I thought this

tornado.CFrame = tornado.CFrame * CFrame.Angles(0,0,-20.4)

wouldve fixed it but it just flips right over

1 Like

It won’t work because you’ve already welded it, all it’s doing is flipping the character AND the tornado. Try setting it’s CFrame rotation before the weld!

2 Likes
script.Spin.OnServerEvent:Connect(function(plr)
	char = plr.Character
	Torso = char.Torso
	tornado = game.ReplicatedStorage.TOOLS.Tornado:Clone()
	tornado.Parent = game.Workspace
	tornado.CFrame = tornado.CFrame * CFrame.Angles(0,0,20.4)
	wield = Instance.new("Weld")
	tornado.CFrame = Torso.CFrame
	wield.Part0 = Torso
	wield.Part1 = tornado
	wield.C0 = Torso.CFrame:Inverse()
	wield.C1 = tornado.CFrame:Inverse()
	wield.Parent = tornado
	tornado.Parent = game.Workspace
	tornado.CanCollide = false

end)

Now it doesn’t seem to be flipping the character or the tornado.

1 Like

You need to rotate after you set it’s CFrame

script.Spin.OnServerEvent:Connect(function(plr)
	char = plr.Character
	Torso = char.Torso
	tornado = game.ReplicatedStorage.TOOLS.Tornado:Clone()
	wield = Instance.new("Weld")
	tornado.CFrame = Torso.CFrame
	wield.Part0 = Torso
	wield.Part1 = tornado
	wield.C0 = Torso.CFrame:Inverse()
	tornado.CFrame = tornado.CFrame * CFrame.Angles(0,0,20.4)
	wield.C1 = tornado.CFrame:Inverse()
	wield.Parent = tornado
	tornado.Parent = game.Workspace
	tornado.CanCollide = false

end)

Thanks, this worked!

2 Likes