Knife throw rotation [SOLVED]

this works

while wait() do
	script.Parent.Orientation = Vector3.new(script.Parent.Orientation.X + 30, script.Parent.Orientation.Y, script.Parent.Orientation.Z)
end

i mean this

local Knike = script.Parent

local function Rotate()
	if Knike.Orientation.X > -90 then
		Knike.Orientation = Vector3.new(Knike.Orientation.X - 15, Knike.Orientation.Y, Knike.Orientation.Z)
	else
		Knike.Orientation = Vector3.new(90, Knike.Orientation.Y, Knike.Orientation.Z)
	end
end

while wait() do
	Rotate()
end

Thank you. I will try it when I come back home.

or this

local Knike = script.Parent
local TweenService = game:GetService("TweenService")

local function Rotate()
	if Knike.Orientation.X > -90 then
		TweenService:Create(script.Parent, TweenInfo.new(1, Enum.EasingStyle.Linear), {Orientation = Vector3.new(-90, Knike.Orientation.Y, Knike.Orientation.Z)}):Play()
		wait(1) Rotate()
	else
		Knike.Orientation = Vector3.new(90, Knike.Orientation.Y, Knike.Orientation.Z)
		Rotate()
	end
end
Rotate()

sometimes it breaks so i recommend the other script

Just came back. I’m gonna try that right now.

Nope, It’s still upside down :frowning:

Can i have a screenshot? So i could know what is happening

It’s upside down rotating consistently.

It should rotate like this:

X:

local Knike = script.Parent

local function Rotate()
	if Knike.Orientation.X > -90 then
		Knike.Orientation = Vector3.new(Knike.Orientation.X - 15, Knike.Orientation.Y, Knike.Orientation.Z)
	else
		Knike.Orientation = Vector3.new(90, Knike.Orientation.Y, Knike.Orientation.Z)
	end
end

while wait() do
	Rotate()
end

Y:

local Knike = script.Parent

local function Rotate()
	if Knike.Orientation.X > -90 then
		Knike.Orientation = Vector3.new(Knike.Orientation.X, Knike.Orientation.Y - 15, Knike.Orientation.Z)
	else
		Knike.Orientation = Vector3.new(Knife.Orientation.X, 90, Knike.Orientation.Z)
	end
end

while wait() do
	Rotate()
end

Z:

local Knike = script.Parent

local function Rotate()
	if Knike.Orientation.X > -90 then
		Knike.Orientation = Vector3.new(Knike.Orientation.X, Knike.Orientation.Y, Knike.Orientation.Z - 15)
	else
		Knike.Orientation = Vector3.new(Knife.Orientation.X, Knike.Orientation, 90)
	end
end

while wait() do
	Rotate()
end

Maybe use one of these

Or if it doesnt work, is there any errors in your output

Sure, I will try that. Wait maybe my knife is rotated wrong? What rotation do I set it to?

Use one of these scripts if you dont understand, i edited the post

Oh my god it worked! Thank you so much!

1 Like

The only thing I’d recommend in this code is to change wait() to something that’s more optimized like task.wait(), but everything else is good. :+1: