Adjust position according to size

I am making a game and when I use my tool, a ball forms in front of my head and increases size, but when it reaches a certain size, the ball goes “into” my head. I want it to always be in in front of my face regardless of size

here is my atual script checker

1.     local bubble = script.Parent:WaitForChild("Bubble")
2.     local CframePart = script.Parent:WaitForChild("cframe") --This is a part that I created and it is also the place it is to be regardless of size

3.     while wait()do
4.       if script.Parent.Yes.Value == true then
5.         bubble.CFrame = CframePart.CFrame
6.         end
7.     end

Are you saying that, as it gets bigger, it encompasses your face? And that it needs to be at the position of CframePart regardless? Either your definition of ‘in front of’ needs to change, or CframePart’s distance from your face needs to scale with the size.

For a quick fix, you could change line 5 to
bubble.CFrame = CframePart.CFrame + [PlayersHead].CFrame.lookVector*bubble.Size.X/2
This assumes bubble is shaped like a bubble for simplicity.

1 Like