local rs = game:GetService("RunService")
local p = script.Parent
local a = p:FindFirstChild("Attachment")
local b = p:FindFirstChild("Hit")
if not a or not b then return end
rs.Heartbeat:Connect(function()
local p0 = a.WorldPosition
local p1 = b.WorldPosition
local diff = p1 - p0
local len = diff.Magnitude
p.Size = Vector3.new(1, 1, len)
p.CFrame = CFrame.new(p0, p1) * CFrame.new(0, 0, -len/2)
a.Position = Vector3.new(0, 0, 0)
b.Position = Vector3.new(0, 0, len)
end) Is my script but the promblem is its not updating correctly or even matching the positions of attachments