You can write your topic however you want, but you need to answer these questions:
What do you want to achieve? Keep it simple and clear!
a Smooth turn like shown in https://driftboss.io/
What is the issue? Include screenshots / videos if possible!
i cant find how to rotate a modle smoothly it only rotates 1nce and if i repeate the movment it goes back and forth
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
ive tryed adding vector 3 for example local PrimCFrame = script.Parent:GetPrimaryPartCFrame()
local Rotation = CFrame.Angles(math.rad(0),0.1,0) + Vector3.new(0,0.5,0)
local RotatedCFrame = PrimCFrame * Rotation
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
local Over = true
local Under = true
game.ReplicatedStorage.ButtonDown.OnServerEvent:Connect(function()
--Rotation variables
local PrimCFrame = script.Parent:GetPrimaryPartCFrame()
local Rotation = CFrame.Angles(math.rad(0),0.1,0)
local RotatedCFrame = PrimCFrame * Rotation
--Rotation variables
Over = true
Under = true
repeat
wait(0.5)
print(script.Parent.RotationPart.Rotation.Y)
-- detects the rotation
if script.Parent.RotationPart.Rotation.Y >-91 then
Under = false
end
if script.Parent.RotationPart.Rotation.Y <-89 then
Over = false
end
-- detects the rotation
script.Parent:SetPrimaryPartCFrame(RotatedCFrame)--rotates
until Over == false and Under == false
print("Over")
end)
Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.
I recommend using tween service for this. something like this
TweenService = game:GetService("TweenService")
spininfo = TweenInfo.new(2,Enum.EasingStyle.Linear) -- the 2 determines how long it will take to rotate
Spin1 = TweenService:Create(script.Parent,spininfo,{CFrame = script.Parent.CFrame * CFrame.Angles(0,math.rad(120),0)})
Spin1:Play()
Works great ty everyone who helped and if your wondering
game.ReplicatedStorage.ButtonDown.OnServerEvent:Connect(function()
for i = 1, 5 do
script.Parent:PivotTo(script.Parent:GetPivot() * CFrame.Angles(0, math.rad(-18), 0))
wait(0.00000001)
end
end)
game.ReplicatedStorage.ButtonUp.OnServerEvent:Connect(function()
for i = 1, 5 do
script.Parent:PivotTo(script.Parent:GetPivot() * CFrame.Angles(0, math.rad(18), 0))
wait(0.00000001)
end
end)
is my script