How to Make a Block Spin in Roblox Studio

avatarCompletingClint2 years ago
Best Answer
avatarDistributingJoke2 years ago

I did this in one of my games! Add a `Script` to the block and try this code snippet:

```lua

while true do

script.Parent.CFrame = script.Parent.CFrame * CFrame.Angles(0, math.rad(3), 0)

wait(0.1)

end

``` Works like a charm!

Play Games.Earn points.Get gift cards!

PB

PB

Playback Rewards

4.5 Star Rating(13.7k)
Silly Arrow
User avatarUser avatarUser avatarUser avatar

500k players and counting...

More Answers

avatarImplementingPons2 years ago

Just use CFrame.Angles in a loop. It's really that simple!


avatarBustingSpire2 years ago

Easy peasy! Just insert a `Script` in the block and use a loop with CFrame rotation. Try this:

```lua

while true do

script.Parent.CFrame = script.Parent.CFrame * CFrame.Angles(0, math.rad(1), 0)

wait(0.01)

end

```


avatarCoilingShip2 years ago

Why not try using a Tween? It gives smoother results, but the loop method works fine too.


avatarTargetingDirt2 years ago

Create a Script object inside your block and then use a loop with CFrame. Check out the simple code:

```lua

while true do

script.Parent.CFrame = script.Parent.CFrame * CFrame.Angles(0, math.rad(2), 0)

wait(0.05)

end

```

馃憖 If you like Roblox...

avatarDiego3 hours ago
If you're a Roblox player looking for extra robux, you need to download the Playbite app!

Playbite is like an arcade in your phone: you get to play all kinds of fun and simple games, compete with friends and others, and win cool prizes from all your favorite brands!

One of those prizes is the Roblox gift card, which you can win and use to get robux essentially for free!

In case you鈥檙e wondering, this is how it works: 

Playbite makes money from (not super annoying) ads and (totally optional) in-app purchases. The app then uses that money to reward players like you with prizes!

Download Playbite for free, available on the App Store and Play Store!

The brands referenced on this page are not sponsors of the rewards or otherwise affiliated with this company. The logos and other identifying marks attached are trademarks of and owned by each represented company and/or its affiliates. Please visit each company's website for additional terms and conditions.

Add an Answer