Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do i make an NPC spin really fast on a loop?

I want to make an NPC that spins very fast on all rotations in a loop like geddan if you understand

1 answer

BodyAngularVelocity was made just for this.

Make a server script and put it inside the NPC model.

local HRP = script.Parent.HumanoidRootPart

local bodyAng = Instance.new("BodyAngularVelocity",HRP) --make a BOV and parent it to the NPC's humanoid root part
bodyAng.AngularVelocity = Vector3.new(0,1,-2)  --set the angular velocity to whatever you like. This specific configuration will turn the NPC 1 times per second on the Y axis and 2 times on the Z axis. You can change the direction it turns by adding a negative.

local bodyPos = Instance.new("BodyPosition",HRP) --body position keeps the HRP in place 
bodyPos.Position = HRP.Position --sets the position to wherever you place the NPC in the workspace so you don't have to worry about changing this value

4 comments

0

i put the script in the root part and put BodyAngularVelocity and it's not spinning

0

@LeedleLeeRocket

0

Make sure you unanchored the HRP. I'll edit my script to include a body position which will keep the NPC in place.

0

You should also select all the parts in the NPC and select Massless so that it spins at maximum velocity which I think is what you want

This discussion is preserved as it was. New answers, comments, and votes are closed.