This is my script. I have a sword and I want it to swing whenever the player clicks a button, I have all that coding done its just that the orientation is erroring. If you need more information, just tell me! Hope you can help

game.ReplicatedStorage.Remotes.Swing.OnServerEvent:Connect(function(player)
	 if Equipped == true then
		script.Parent.Orientation = Vector3.new(script.Parent.Orientation.X - 8, script.Parent.Orientation.Y, script.Parent.Orientation.Z)
       wait(1.8)
		script.Parent.Orientation = Vector3.new(script.Parent.Orientation.X + 8, script.Parent.Orientation.Y, script.Parent.Orientation.Z)
	end 
end)

3 comments

0

in what way is it "erroring", is it jittering around, is it falling out of the player's hand, is it simply not rotating at all

0

im not entirely sure what you are trying to achieve, but i suggest looking into animations if you haven't already.

0

It isn’t rotating at all