Need a spinning part to carry a player

Hello! The spinning part in the video spins perfectly and everything but it doesn’t carry the player with it. If someone could help me with this issue that would be great! Thanks! (script and video below)

sphere = script.Parent
a = 0
 repeat
  sphere.Rotation = Vector3.new( 0, a, 0)
  wait(.01)
  a = a+3
 until pigs == 1

https://gyazo.com/880f3afcccaac78f16c7d448adf30045

You can use hinge, change some settings and then attach the part you want to spin with an anchored part by using the hinge. This will allow the part to carry the players without using script and lag won’t affects your spinning part much!

I would do that, but here I am putting the spinning part in the middle of an anchored part.

try using tween service or something cuz this way is too bad or try BodyAngularVelocity

Yeah but I don’t know how to lol

isnt that hard lol
for bodyangular you just add an object called body angular and the angular velocity property to Vecttor3.new(0,10,0)
,where 10 is the speed

Can you copy and paste the script and put it in there so I can see how it looks because whenever I tried to do that it just stayed in one place and didn’t move.

You can try to put a line of blocks to hole it up and unanchor the thing that the player needs to stand on

Here is another video example of what I am trying to do. I am putting it in the middle of a part with no hinges and it is working, but it doesn’t carry the player. https://gyazo.com/b41ca2374e79d8be64d9fd849de21311

Hey man, you shouldn’t need any kind of script for this. The problem you are running into by updating the Rotation property is that messing with the CFrame matrix like this is jumping from one orientation to the next without actually rotating to it.

I recommend using HingeConstraint with the “motor” ActuatorType. You will have pretty good control over it and it isn’t too bad to set up.

Here is a breakdown of how to set it up:

  • Create two parts (first part is anchored & has a HingeConstraint and attachment in it, second part is unanchored & only has an attachment in it).
  • Inside of the HingeConstraint make Attachment0 the first part’s attachment, and Attachment1 the second part’s attachment.
  • Change the HingeConstraint ActuatorType to “motor”, and mess with the motor properties to achieve your desired result.

Here is a reproduction place if you are struggling to understand how to set it up:
HingeConstraintExample.rbxl (29.2 KB)

edit: just read that you’ve placed your spinning part in the middle of another part, sorry for not seeing this before. if you separate your pole in the middle and allow it to be anchored just above the hinge you will see a pretty good result. my fault for not fully reading first.

If I try to put a platform in the middle of the part it just stops working. https://gyazo.com/b41ca2374e79d8be64d9fd849de21311 This video is what I want it to look like but I want it to be able to carry the player.

Does the pole need to be CanCollide? It seems like it will have no reason to be, which means you could simply make it CanCollide false and then allow the HingeConstraint to work.

edit: I’m a little slow functioning tonight aha, apologies. I see that it would defeat part of the functionality now.

It is going to be used for an obby/obstacle course game and the platform in the middle will allow the player to jump on it and then when they are ready to go back on the spinner they will jump off the platform and go to the other side.

The hinge still works if you put parts inside the spinning part

I don’t think it does unless its CanCollide false and it is supposed to be a platform the player can jump on.

Not exactly. Though there is still a solution, it may just be a little out of the way. OP you can seperate your middle piece like this:
image

I would make it a model, with three seperate parts that are all stacked on top of each other, where only the middle one is CanCollide false. Visually you will see no difference but will maintain the ability to stand on top and the spinning functionality.

Also wanted to say I don’t do a ton of this stuff with motors so there is probably a better and more efficient way still.

1 Like

I’m gonna try that right now actually.

Thanks for the help! It works now :slight_smile:

1 Like