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

How to make a circle around the player torso?

Asked by
Nickoakz 231 Moderation Voter
8 years ago

I'm trying to make a script generate a circle around the Torso. The issue is that I can't get the circle to turn with the Torso, it stays on the Z axis..

wait()
while wait() do
local diameter = 12
local blocks = 24
local blocksize = Vector3.new(0,2,1)
local model = Instance.new("Model", workspace)
for r = 1, blocks do
    local block = Instance.new("Part", model)
    block.FormFactor = "Custom"
    block.Anchored = true
    block.Size = Vector3.new(1,1,1)
    block.CFrame = Workspace.Player.Torso.CFrame + 
        (Workspace.Player.Torso.CFrame * CFrame.Angles(math.rad(r*(360/blocks)),0,0)).lookVector * 
        (.5*diameter)
    wait()
end
wait()
model:Destroy()
end 

Edit: Got it to rotate with the torso, but I can't get it to be around the torso, not be in front of it and behind it. If I change

CFrame.Angles(math.rad(r*(360/blocks)),0,0))

to

CFrame.Angles(0,0,math.rad(r*(360/blocks))))

The parts won't circle around the torso, instead, it only stays in front of the torso.

1 answer

Log in to vote
-1
Answered by 8 years ago

unanchor is and weld it thats all i can say form trying right mnow

0
Although I can use welds to help reduce server lag from having to find the CFrame every (wait.02). Just, no. Telling me to weld isn't helping me find out the way to get the script to CFrame the weld for me. Nickoakz 231 — 8y
0
actually you have it set to the torso lookVector so try setting it to somthing else. try putting a part in the torso and then circle around that WeBuiltOurOwnWorld 6 — 8y
Ad

Answer this question