How to position a grouped part?

How do I position a grouped part?

This will show in the output

2 Likes

Is the part a model or a normal part?

1 Like

a normal part

it consists of two parts

2 Likes

Can I see the structure of the part?

1 Like

Sure

image

You’re trying to set the position of a model, you can move an entire model via the MoveTo method of Models or to move a specific part, just reference it, you’d have to have different names for them, what is your code?

To fix this you will firstly need to weld the first part to the other with a weld constraint then set the primary part of the model to the first part and then in your script do this:

Explosion:SetPrimaryPartCFrame(CFrame.new(0,0,0))
3 Likes
local beam = game:GetService("ReplicatedStorage"):WaitForChild("Beam"):Clone()
			local explosion = game:GetService("ReplicatedStorage"):WaitForChild("Explosion"):Clone()
			local hrp = character:FindFirstChild("HumanoidRootPart")
			beam.Parent = workspace
			beam.CFrame = hrp.CFrame * CFrame.new(2,0,-2)
			
			
			local bv = Instance.new("BodyVelocity", beam)
			bv.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
			bv.Velocity = CFrame.new(beam.Position, Value2).lookVector * 100
		
		beam.Touched:Connect(function(hit)
			if hit.Parent.Name == Player.Name then return end
			if hit.Parent.Name ~= Player.Name and hit.Parent:FindFirstChild("Humanoid")  then
				explosion.Position = beam.Position
				beam:Destroy()
				explosion.Parent = workspace
				
				local TweenService = game:GetService("TweenService")
				local Info = TweenInfo.new(4, Enum.EasingStyle.Linear, Enum.EasingDirection.Out, 0, false, 0)
				local properties = {
					Size = Vector3.new(5,5,5), 
				}

				local Tween = TweenService:Create(explosion, Info, properties)
				Tween:Play()
				
			end

I want to put the explosion in the position of the beam

1 Like

Change this

explosion.Position = beam.Position

To this

explosion:MoveTo(beam.Position)
1 Like

https://gyazo.com/0f2014c29fef88b3df1d6aeac3c644f8

it will not move to the position of the beam

1 Like

Ill watch the weld tutorial first

1 Like

Okay so I did some research and Beams don’t have a position property. You have to either use Attachment0 (Start position of beam) or Attachment1 (End position of Beam) and use their CFrame

explosion:MoveTo(beam.Attachment1.CFrame.Position)

Or you could directly reference their Position without using CFrame.Position

Maybe this’ll work?

1 Like

It doesnt, it says

But it works if I weld the parts.

Thanks for the help both of you<3

1 Like

Huh? Beams hae 2 Attachments on them, I’m not sure what’s happening there, but I guess it’s okay if you weld them together, does it at least position it correctly now?.

Also your tween isn’t working cause a model doesn’t have the Size property, you have to make it tween the parts in the model instead

1 Like

the beam that I was using is a just another fireball, thats why it doesnt have attachments. Thanks for the advice in the model it works now.

1 Like

Ohhh, I thought you meant an actual beam thing haha. Are you still having issues with the position not working?

The position now works, same with tween

1 Like

Alright! I recommend putting one of the posts that has helped you the most as the solution to give people a quick way to find what helped you incase if they have a similar issue!

If you have anymore issues don’t be afraid to make another post!

1 Like