Roller blind 3 (needing a few help on it)

my earlier questions were literally left unawnsered so i created a new topic again.

https://devforum.roblox.com/t/trying-to-make-a-roller-blind-v2/3607285/2

I just need help fixing what is wrong with the script, and instead of ProximityPromptService.PromptTriggered which affects all things that need proximityprompt, add in the other problem in this video which i shall show

so how do i substitute for my blind to work again instead of affecting the whole users of proximityprompt, and how do i attach the origin line to the top (i cant explain much about it)


this is what one of the scripters suggested me as tested above


local tweenService = game:GetService('TweenService')

local TARGET_SIZE_Y = 0.5

local TWEEN_DURATION = 1

proximityPromptService.PromptTriggered:Connect(function(prompt: ProximityPrompt)
	local blind = prompt.Parent
	
	if not blind:IsA('BasePart') then
		return
	end
	
	if not blind:GetAttribute('OriginalSize') 
		blind:SetAttribute('OriginalSize', blind.Size)
		blind:SetAttribute('OriginalCFrame', blind.CFrame)
	end
	
	if blind:GetAttribute('Open') then
		blind:SetAttribute('Open', false) -- the blind is open so we close it
		
		tweenService:Create(blind, TweenInfo.new(TWEEN_DURATION), { Size = blind:GetAttribute('OriginalSize'); CFrame = blind:GetAttribute('OriginalCFrame'); }):Play()
	else
		blind:SetAttribute('Open', true) -- the blind is closed so we open it
		
		local originalSize = blind:GetAttribute('OriginalSize')
		local originalCFrame = blind:GetAttribute('OriginalCFrame')
		
		-- 1. calculate the difference between the original size and the target size
		local sizeDifference = originalSize.Y - TARGET_SIZE_Y
		local targetCFrame = originalCFrame - originalCFrame.UpVector * sizeDifference * 0.5 -- we are scaling it opposite to the part's Y axis
		
		local targetSize = Vector3.new(originalSize.X, TARGET_SIZE_Y, originalSize.Z)
		
		tweenService:Create(blind, TweenInfo.new(TWEEN_DURATION), { Size = targetSize; CFrame = targetCFrame }):Play()
	end
	
end)```

Look I can’t understand what’s going on with the code( maybe it’s my eyes or the phone but i can’t read) , but from the video i think the problem is here

Try changing the 0.5 to 3
Or remove the UpVector * sizeDifference
And try to see the difference, this maybe fixes the problem or tells you where it is.