Help with bubble gum positioning

So when I click, the bubble gum expands, and I want it to position only on the character’s face, like in a bubble gum simulator, rather than covering the entire body.

Here is the video:

Here is the Local Script:

local function TweenBubble()
	local BubbleTweenInfo = TweenInfo.new(0.5, Enum.EasingStyle.Cubic, Enum.EasingDirection.Out, 0, false, 0)
	local BubbleTweenSize = {Size = Character:WaitForChild("Pink Gum").Handle.Size + Vector3.new(0.1, 0.1, 0.1)}

	RemoteEvents.BlowBubble:FireServer("Blow")

	TweenService:Create(Character["Pink Gum"].Handle, BubbleTweenInfo, BubbleTweenSize):Play()
end

image

You should also be tweening the attachment’s position to move the part based on the size.

How would I do it? Can you give an example.

Well, firstly you’d need to create another tween and play it. Secondly, since I believe your size is increased by 0.1, you’ll need to increase the position offset by 0.05.

TweenService:Create(Character["Pink Gum"].Handle.Mesh, BubbleTweenInfo, {Offset = Character["Pink Gum"].Handle.Mesh.Offset+Vector3.new(0, 0, 0.05)}):Play()

I believe this is an idea of what you’re looking for.

It doesn’t work because it still covers the player character when it gets bigger instead of covering the face only.

you need to setup another part call it bubblegum parent it to pink gum accessory also then unanchor it make sure it is welded to your handle for the accessory now that is actually going to be your visible gum and you need to offset the position of that part to the player head so it would be something like this

bubblegum.Position =  Head.Position  + (Head.CFrame.LookVector * bubblegum.Size.X/2)
1 Like

it seems it didn’t work. I tried all what you said.

You need to change the CFrame of the weld. I don’t know where the weld is so I can’t help you.