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

How would I make this part surround me?

Asked by 8 years ago

Hey there, I have been attempting to make something really cool for a admin command. However, I don't have any idea how I would make the part that spawns circle up around me using a BodyPosition. Any help would be appreciated and here's the script for it:

local player = game.Players.Player

player.Chatted:connect(function(msg)
    if msg:sub(1,8) == [[#Standby]] then
        local part = Instance.new([[Part]], workspace)
        part.Shape = [[Ball]]
        part.CanCollide = false
        part.Size = Vector3.new(.3,.3,.3)
        local bp = Instance.new([[BodyPosition]],part)
        bp.maxForce = Vector3.new(math.huge,math.huge,math.huge)
        local char = player.Character
        local rightarm = char:WaitForChild([[Right Arm]])
        local torso = char:WaitForChild([[Torso]])
        part.CFrame = torso.CFrame
        part.Parent = workspace
        while wait() do
        bp.position = torso.Position + Vector3.new(0,math.pi/2,0)
        end
    end
end)

Thank you and I hope someone can help me out with this!

1 answer

Log in to vote
0
Answered by 8 years ago
ocal LocalPlayer = game:GetService("Players").LocalPlayer
local Character = LocalPlayer.Character or LocalPlayer.CharacterAdded:wait()

local Orb = Instance.new("Part", Character)
Orb.Name = "Orb"
Orb.Shape = Enum.PartType.Ball
Orb.CanCollide = false
Orb.BrickColor = BrickColor.new("Green")
Orb.Transparency = 0.25
Orb.Size = Vector3.new(2, 2, 2)
Orb.TopSurface = Enum.SurfaceType.Smooth
Orb.BottomSurface = Enum.SurfaceType.Smooth

local BodyPosition = Instance.new("BodyPosition", Orb)

while wait(0) do
    BodyPosition.Position = Character.Head.Position + Vector3.new(2, 1, 0)
end
0
And put a body position in the script like right click the script and put the body position in it. tyrellyommey123 0 — 8y
0
Why? KingLoneCat 2642 — 8y
Ad

Answer this question