How to Make a Rotating/Spinning Model in Roblox Studio
Вставка
- Опубліковано 30 тра 2022
- Thank you for watching!
If you enjoyed, please subscribe and like, as it is how you show your appreciation on this whole UA-cam website, yeah you probably haven't heard of it... anyways, have a good day.
Script if you need any help:
while true do
script.Parent:SetPrimaryPartCFrame(script.Parent.Center.CFrame * CFrame.fromEulerAnglesXYZ(.1, 0, 0))
wait()
end
pin this bro
you can use CFrame.Angles instead of CFrame.fromEularAnglesXYZ
dude you have no idea how helpful this was, thanks so much!
Dude, you dont know how much this helped. I was building a drag car and wanted to get fancy and wanted my turbos turbine to spin, and it worked. Thank you so much!
dude i was searching this up for like 7 months and you just did it the simplest way possible you DESERVE more subscribers then this (i will subscribe in a second :D)
Actually exactly what I needed. Great Tutorial!
always the genius kid coming in clutch thanks so much man
Great tutorial. Watched maybe 10 from other creators and none of them worked. Thank you! 🎉
Now I have a working fan in my game, thank you so much!
Thank you so much! I am making a obby game and needed this. Thanks again! 😁
Bro helped me a lot. Here's a subscribe for u.
=)) Hope you succeed in the youtube career.
thank you so much 🎉🎉🎉
this is so useful
with this guide I made a rotating skybox
omg your a lifesaver, i needed this script for a bossfight where a laser machine would spin around
Thanks, great video
it worked! now i can make my fan!
THANK YOU. I am making a car game, and I was exploding my brain trying to figure out how to make it spin inside of the viewportframe. This video really helped.
No problem! Glad it helped!
Easy way to center something: get the position of the part(or parts) that you want to center the other part on, and then paste the location onto the part you want to center.
I may make a tutorial video on it at some point
Straight up actually helped
This Helped Me Make Hex - A - Ring
I've been looking for this for months
Could you make a video on how to make something swing like a pendulum?
thank you so much
Thanks! I wanted to make an air raid siren that would rotate but I didn't know how. 😃👍
Glad I could help!
Yo what are your font settings they look rlly nice
so i have a question, do you know how to make the hinge go faster over-time?
Thank you so much.
Thanks
My primary part wont allows anything in it help and Idk if it's anchored or not it won't tell me this is my first day using it as well
My model refuses to spin no matter what I do. I have no error in the script, anchored both the parts, they are both in a model, Center is set as primary. I don't understand.
Tysm!
good tutorial now i can make a wind turbine
this is great for the lighthouse i am building thanks!
I have one question. How to make it like stop while some angle is made. Like when it turns 360 it stops. Imo it is smth with while not true but wat to put there as if I am correct.Anyways great tut.
tween it, add conditions to the loop, or use a repeat until with a condition
Anyother way is using align positions and angles
how would i make it do like a vertical spin, bc im making a windmill and all the other people are doings it by the x axis
vertical spin where is spins on the y axis? you change the code. in the script, theres the three numbers in parenthesis. mess around with where the number is until your satisfied. ex: (1, 0, 0) change it to (0, 1, 0) etc until you are happy with the results.
If you want it to move smoother, use task.wait. it will make your rotations more smooth.
while task.wait() do
script.Parent:SetPrimaryPartCFrame(script.Parent.Primary.CFrame * CFrame.fromEulerAnglesXYZ(0, .01, 0))
end
Got it to work, but doesn't seem to physically effect the player if they were to stand on the part for example. Anyway to make a player effected by the rotation? Or have them fall off if they were on a rotating log for example?
Might have to watch a video on the first one 🤷♂️, I do know you can get two parts on the sides of the parts, and then connected them with loose joints to make a wipeout twisty-type thing. Getting a rotating log that moves around when you walk on it would be a bit harder, at the moment I can’t think of how, but if you need help I can try to make it on Roblox studio. Thanks!
@@millzzz_ Its not that I need the log to rotate with the players weight, but in theory the physics engine should handle that automatically if I set up a proper point to pivot on right?
@@sensei1781 if it’s unanchored, yes. It can move freely wherever you want when in’s unanchored, so this can cause some problems, but the physics engine can comprehend spinning on a pivot point.
It didn't work :(
Edit: Lol, it didn't work because the video was playing at 360p and i didn't see well and i put wrong symbol
primary part isnt under pivot,??
Do you by chance know how to make a part spinning around another part?
Group the two parts in the same model and set the center part as the primary part. if you think about it, that’s exactly what you normally do, except you hide the center part inside the main part.
i tried this again on a different model and it didnt work, I did everything on the video
I tried to edit XYZ but it still didnt work
EDIT: i renamed it incorrectly
Im trying to make a fan but it wont spin
**heavy breathing**
How would I make a player move with the object? Currently the player doesn't continue standing on it but I want it to move with it
tbh donno. i used to script a lot but i haven’t scripted much anymore and have lost lots of memory. there is probably a youtube tutorial out there somewhere. try a different rotation script from a different video
@@millzzz_ dw man ill try n figure it out myself lmfao maybe ill try tweening or smth
i have a question. how did you make the scripting window look like a terminal?
There is a free plugin that you can add that lets you customize your roblox studio layout and colors. I chose the terminal one but there’s many color pallets to choose from. I can’t remember what the plugin is called at the time but it shouldn’t be hard to find.
@millzzz_ Oh okay thanks
Eular angles is a bad example, you should do .angles
Do u know how I can make a swinging bell that goes back and forth endlessly?
Make the bell, and put on the script and make it spin on the y axis, wait a second or two seconds, then make it spin on the y axis negatively (all of this in the while true do loop) edit the numbers and the wait time until it looks good
in my roblox game is like lagging when i enter
I was wondering if there was a way to make it go in the opposite direction at random times, do you know how to do that?
in the “wait()” do “wait(math.random(lowest possible wait time, highest possible
wait time)” and then copy the script on the other side but invert the number.
Ex. while true do
(the script)
wait(math.random(1,10))
(the script)
wait(math.random(1,10))
end
so it will wait a random number between one and 10 seconds and then invert
lmk if this works!
@@millzzz_ Thanks, do I use this script as the spin script or a separate script?
@@HorrorChef929 in the same script as the spin one.
will this work for helicopter
Is there any way to make it spin more smoothly?
To make it smoother you would make the wait faster, and 0.01 is the lowest it can be without being zero. Maybe if you try “wait()” it might run smooth but cause a bit more lag. I don’t even know if it works.
@MarkoUkraine
Would this be able to work on multiple unions?
If you put them in one group, yes 👍
@@millzzz_ You wouldn't mind putting that into more detail? Do you mean put the unions in their own group or keep all the unions in the same group with the script and center part?
How do you adjust the speed?
edit the Euler angles value :)
How i can change the speed of spinning?
Change the number in the parenthesis
isnt this deprecated
while true do
script.parent.CFrame = script.Parent.CFrame * CFrame.fromEulerAnglesXYZ(0.1,0,0) -- change it to ur liking
wait(0.01)
end this is a much simpler script but am new to scripting so dont be mad if it turns out wrong
I don’t have the primary part option?
I had this same problem. Make sure it’s a group model. If that works keep looking idk
how do i do this with more than 1 part
group the parts together by selecting the ones you want to spin, and then pressing control-g or by pressing "group" on the top of the screen. then, select a primary part, as it explains in the video. then do the script as normal, inside of the group, and your set/
how do you make it slower?
adjust the numbers in the parenthesis. i set it to .1, but you can set it higher to 1 to make it really fast, or lower like .01 to. make it real slow. so. adjust it and make the number smaller or bigger depending on the speed you want.
What's the background music? I love it.
Glad you asked! The background music is actually made by me! They are pretty old, but if you look on my videos you might be able to find them. “Lofi Rainy Day” and “Grain” are the two songs used. You can use them in your videos if you provide credit. Hope this helps!
@The POET
it wont work!!
Weird! Have you double checked the script is fully correct? Is it a model? Is there a primary part in the model selected? Try restarting the video with a new model to see if it works
@@millzzz_ script is the exact same, its a model, model has primary part
@@millzzz_ PrimaryPart doesnt show
Can you help me recreate this System ua-cam.com/video/crzL8yLfFmU/v-deo.html ?so there are those green cylinder platforms. They behave like would locks in water. Basically when the player moves left or right, the cylinder platform rotates under them into the opposite direction .
Totally! Can you put a time stamp where there’s the green cylinder platforms so I can understand what you mean? Shouldn’t be too tricky, i can definitely help
@@millzzz_ 2:11:35
i'm watching this to make a spinning peter griffin cube.
i'm making an obby time trial game
copy and paste for yall enjoy
while true do
script.Parent:SetPrimaryPartCFrame(script.Parent.Reactor core.CFrame * CFrame.EulerAnglesXYZ(0, 0, 0))
wait()
end
replace the 0's with whatever number u want lmao the bigger the number the faster it is the first number is X the second number is Y the third number is Z