A very very weird problem with position

I’ve tried everything, but the script always leaves “Efeito2” in the wrong position, don’t worry about the name of the variables, it’s because I speak another language

"Efeito2" is what hasn’t disappeared

--Serviços
local ServerStorage = game:GetService("ServerStorage")
local ReplicatedStorage = game:GetService("ReplicatedStorage")

--Partes
local LightBomb = ReplicatedStorage:WaitForChild("LightBomb")

--Clones/Partes
local LightBombClone = LightBomb:Clone()
local EfeitoClonado = LightBombClone.Efeito
local Efeito2 = LightBombClone.Efeito2
EfeitoClonado.Enabled = false

--Eventos
local LightBombCriarPoderEvent = ReplicatedStorage:WaitForChild("LightBombCriarPoderEvent")

--Variaveis
local Naotocou = true
local contagem = 0

LightBombCriarPoderEvent.OnServerEvent:Connect(function(plr, mouse)
	
--Player Partes
local character = plr.Character or plr.CharacterAdded:Wait()
local Root = character.HumanoidRootPart
local Head = Root.Parent.Head
	
LightBombClone.Parent = workspace

	
local Weld = Instance.new("WeldConstraint")
LightBombClone.Anchored = true
Weld.Parent = LightBombClone
Weld.Part0 = LightBombClone
Weld.Part1 = Root

EfeitoClonado.Enabled = true
	
spawn(function()
		for x = 4,40,1 do
			wait(0.01)
			LightBombClone.Position = Head.Position + Vector3.new(0,x,0)
		end
	end)
	
spawn(function()
	for i = 1,60,1 do
		wait(0.01)
		LightBombClone.Size = Vector3.new(i,i,i)
	end	
end)
	
	wait(3)
	Weld:Destroy()
	local BV = Instance.new("BodyVelocity")
	BV.Name = "VelocidadeDoPoder"
	BV.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
	BV.Parent = LightBombClone
	BV.Velocity = mouse.lookVector
	LightBombClone.Anchored = false
	
	delay(3, function()
		for n = 1,25 do
			wait()
			BV.Velocity = mouse.lookVector*n
		end
	end)
	
	LightBombClone.Touched:Connect(function(QuemTocou)
		if QuemTocou.Name == "Chao" and Naotocou then
			wait(1.65)
			Efeito2.Parent = workspace
			workspace:WaitForChild("Efeito2").Script1.Disabled = false
			BV:Destroy()
			LightBombClone.Anchored = true
			character.CameraShake.Disabled = false
			Naotocou = false
			wait(7)
			for y = 0,1,0.1 do
				wait(0.1)
				LightBombClone.Transparency = y
			end
			character.CameraShake.Disabled = true
		end
	end)
end)

What’s the right position supposed to be?

i dont know about this, maybe LightBomb positon

I mean, what is the correct position for Efeito2?

You only said Efeito2 is in the wrong position, but you do not say what the correct position is.

this “Efeito2” will be a vfx effect so I need it to be in the same position as the LightBomb, so I tell it to stay in the same position as the LightBomb is, but unfortunately it is a few studs down and to the side

You could try modifying its CFrame instead of its position. When you position something it’ll be positioned above any parts that are already there, but when you modify something’s cframe it’ll go to that position even if there’s already a part there.

I’ve tried to move with CFrame but I don’t know if I did it the right way, I just remained in position for CFrame

Can you show what you did? Were there any errors?

there are no errors, the position of the “Efeito2” just gets wrong

I mean can you show what you did when you tried to cframe it? You said when you tried to cframe it it didn’t move at all and you don’t know if you did it the right way, so if you show me how you did it I’ll be able to tell you if you did something wrong.

Edit:
image

Anyway if all the other scripts give the wrong position then there’s probably some other problem.

while wait() do
script.Parent.Position = workspace:WaitForChild("LightBomb").Position
end

image

oh I forgot to mention, every time the touched event is activated, any script gives the wrong position of LightBomb, no matter which script I try to pull the position on

with CFrame

while wait() do
script.Parent.CFrame = workspace:WaitForChild("LightBomb").CFrame
end

I told you, i just remained in position for CFrame