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

How would I make this part surround me?

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

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

2 comments

0

And put a body position in the script like right click the script and put the body position in it.

0

Why?

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