Title says everything what i need, i simple need part rotate
What is the issue? Include screenshots / videos if possible!
I have no clue how to make my script work. Idk if you need screenshots there because they are not need
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I tryed to make my object orientation, but no idea how to make it spinning with it
local SpinObject = script.Parent
while true do
SpinObject.Orientation = SpinObject.Orientation + 1
wait(0.2)
end
Orientation is a Vector 3 value, meaning you can’t just do + 1. Vector 3s are composed of 3 values, i.e. x y and z. If you want your object to spin, lets say on the z axis, you’ll have to do something like this:
local SpinObject = script.Parent
while true do
SpinObject.Orientation += Vector3.new(0,0,1)
task.wait(0.2)
end
This is just another way to write a calculation formula.
SpinObject.Orientation += Vector3.new(0,0,1)
means
SpinObject.Orientation = SpinObject.Orientation + Vector3.new(0,0,1)
In many programming languages,
you can write i = i + 1 as i += 1, i = i - 1 as i -= 1, for example.
+= is simply adding a new number instead of doing this:
-- Fast Way
workspace.NumberValue.Value += 1
print(workspace.NumberValue.Value) -- Printing Out The Value Inside The NumberValue And See If The Value Adds Up.
-- Slow Way
workspace.NumberValue.Value = workspace.NumberValue.Value + 1
print(workspace.NumberValue.Value) -- Printing Out The Value Inside The NumberValue And See If The Value Adds Up.
Why are you guys still posting somewhere here. This is 2 years old come on. I already using motors in this point. Just like why are you writing this after so much time?
Firstly, last reply was 9 days ago, if your issue was solved you should consider closing this topic rather than taking it out on people who are trying to help you.