Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 3 years ago

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

1 answer

Log in to vote
1
Answered by 3 years ago
Edited 3 years ago

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
0
i put the script in the root part and put BodyAngularVelocity and it's not spinning dylancrazy88 20 — 3y
0
@LeedleLeeRocket dylancrazy88 20 — 3y
0
Make sure you unanchored the HRP. I'll edit my script to include a body position which will keep the NPC in place. LeedleLeeRocket 1257 — 3y
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 LeedleLeeRocket 1257 — 3y
Ad

Answer this question