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

Can someone help me with adding parts in scripts?(really quickly pls)

I need to know how to add a part like in the script, can someone help? I know there is a way to break down the properties like for example this: x = Instance.new("Part") x.BrickColor = BrickColor.new("Really red") x.Size = Vector3.new(8,8,8) x.TopSurface = "Smooth" x.BottomSurface = "Smooth" x.Shape = "Block" x.Name = me.Name x.CanCollide = false x.Transparency = 0.7 fd = script.Firedamage:clone() fd.Parent = x m = Instance.new("SpecialMesh") m.Parent = x m.MeshType = "Sphere" m.Scale = Vector3.new(1, 1, 1) f = Instance.new("Fire", x) f.Size = 20 f.Heat = 9 f.Color = Color3.new(255, 0, 0) p = Instance.new("PointLight", x) p.Brightness = 10 p.Range = 10 p.Color = Color3.new(255, 0, 0) y = Instance.new("BodyVelocity") y.maxForce = Vector3.new(math.huge, math.huge, math.huge) y.velocity = me.Character.Torso.CFrame.lookVector*100 x.Parent = Workspace y.Parent = x

  • But there is a part in my workspace I want to use instead of this( script wise )just dont know how to put it in there, do any of you know how? Pictures and full details would be nice! Thanks.

1 comment

0

no-one can help with that... put it into script form plz

3 answers

Make the part in Workspace x.

x = game.Workspace.Part

3 comments

0

ok let me try that thanks

0

Um I mean replace all that that with a "union operation" part I have in workspace so all of that script was supposed to be removed

0

To break it down I am trying to make a blast and I made a union operation part now I just need to be able to put that part in my script pls message me on roblox

We'll be able to correctly help you when you help us by using the Lua button in your post for any code.

**bin = script.Parent me = script.Parent.Parent.Parent

enabled = true

function onButton1Down(mouse) if not enabled then return end

local player = game.Players.LocalPlayer
if player == nil then return end
enabled = false 
RightShoulder = me.Character.Torso["Right Shoulder"]
	LeftShoulder = me.Character.Torso["Left Shoulder"]
	Run = game:GetService("RunService")
		for i = 1, 12 do
			LeftShoulder.C0 = LeftShoulder.C0 *CFrame.Angles(0, 0, -0.16)
			RightShoulder.C0 = RightShoulder.C0 *CFrame.Angles(0, 0, 0.16)
			RightShoulder.C0 = RightShoulder.C0 *CFrame.Angles(0, 0.1, 0)
			LeftShoulder.C0 = LeftShoulder.C0 *CFrame.Angles(0, -0.1, 0)
			Run.Stepped:wait(0.005)
		end
	game:GetService("Chat"):Chat(me.Character.Head, "Dragon God's Brilliant Flame!")
	x = Instance.new("Part")
	x.BrickColor = BrickColor.new("Bright red")
	x.Size = Vector3.new(26, 26, 26)
	x.TopSurface = "Smooth"
	x.BottomSurface = "Smooth"
	x.Shape = "Ball"
	x.Name = me.Name
	x.CanCollide = false
	x.Anchored = true
	x.Transparency = 0.3
	p = Instance.new("PointLight", x)
	p.Brightness = 20
	p.Range = 30
	p.Color = Color3.new(255, 0, 0)
	x.Parent = Workspace
	fd = script.Firedamage:clone()
	fd.Parent = x
	me.Character.Humanoid.WalkSpeed = 0
	x.CFrame = me.Character.Torso.CFrame*CFrame.new(0, 30, 0)
	game.Debris:AddItem(x, 6)
	wait(1)
	me.Character.Humanoid.WalkSpeed = 16
	x.Anchored = false
	y = Instance.new("BodyVelocity")
	y.maxForce = Vector3.new(math.huge, math.huge, math.huge)
	y.velocity = me.Character.Torso.CFrame.lookVector*150
	y.Parent = x
	f = Instance.new("Fire", x)
	x.CFrame = me.Character.Torso.CFrame*CFrame.new(0, 0, -30)
	fd.Disabled = false
	game.Debris:AddItem(x, 6)
	wait(0.025)
	for i = 1, 12 do
		LeftShoulder.C0 = LeftShoulder.C0 *CFrame.Angles(0, 0.1, 0)
		RightShoulder.C0 = RightShoulder.C0 *CFrame.Angles(0, -0.1, 0)
		LeftShoulder.C0 = LeftShoulder.C0 *CFrame.Angles(0, 0, 0.16)
		RightShoulder.C0 = RightShoulder.C0 *CFrame.Angles(0, 0, -0.16)
		Run.Stepped:wait(0.005)
	script.Disabled = false
	end


wait(5)

enabled = true end

enabled = true function onS(mouse) mouse.Button1Down:connect(function() onButton1Down(mouse) end) end bin.Selected:connect(onS)**

~I Basically wanna change the settings of the property to make it so my part in workspace can replace it

1 comment

0

Instead of posting your new information as an answer, edit your post, place the information at the bottom, and possibly have an "EDIT:" in bold in front of it.

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