Trying to make a roller blind v2

im just trying to follow this guy’s suggested script but there are multiple problems occuring, one of which is proximitypromptservice.game:getservice? or i dont know which had broken everything that uses proximityprompt.
https://devforum.roblox.com/t/im-tryna-make-a-roller-curtain-blind-anyone-can-aid-me-on-it/3591416/17
script originated from
adding this issue as well
image

and here is the script for the roller blind:

local proximityPromptService = game:GetService('ProximityPromptService')

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') then -- you could implement this in some other way but im lazy
		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)

yeah have a good day i guess

1 Like

Nice! You should send a video of how it looks when it’s done. What’s the exact problem that you’re experiencing? Do you need help fixing something orrrr?

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

(edit: this is used by the same exact script shown above as i requested for support for it, i believe all of this is not a building-related problem as it is already proper as it is)

anyone want to help? i need it please!!!