I'm making a turret and it's going to turn when it activates and go on a certain orientation (0, 90, 10). When I activate the script, it just switches to the position I'd like, not at a speed or smooth rotation, just clips. I know I'm doing something wrong here and I haven't added something. Any ideas?
game.Workspace.Frame.Rotation = Vector3.new(0, 90, 10) --The second value of vector3 is a, wait(5) Frame = Frame+3
You can use TweenService to make smooth transitions of movement. I'm not sure what the last two lines are for so I'll just give an example of creating a tween that would make the transition from the current position to your desired rotation.
local TweenService = game:GetService("TweenService") local TI = TweenInfo.new(3, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, 0, false, 0) local goal = {} goal.Rotation = Vector3.new(0, 90, 10) local turret = workspace:WaitForChild("Frame") local tween = TweenService:Create(turret, TI, goal) tween:Play()