Moving Grouped parts with proximity and tweens

  1. What do you want to achieve?
    getting a lever to open a door

  2. What is the issue?
    The proximity prompt is not showing up…

  3. What solutions have you tried so far?
    I moved it from folder into a model in the folder then into a part, nothing pops up…

this is the script I’ve been working on

local OffLever = script.Parent.Parent.Parent.LeverOff
local proximityprompt = script.Parent:WaitForChild("ProximityPrompt")
local OnLever = script.Parent.Parent.Parent.LeverOn
local tweenService = game:GetService("TweenService")
local frame = script.Parent
local opened = script.Parent:WaitForChild("Opened")

local debounce = true
	if debounce == true then
		debounce = false
		if opened.Value == true then
			opened.Value = false
	tweenService:Create(frame,,{CFrame = OffLever.CFrame}):Play()
			opened.Value = true

			tweenService:Create(frame,,{CFrame = OnLever.CFrame}):Play()
		debounce = true

also how I have my Workspace organized
the other Levers are different positions of LeverFrame
I’m assuming I’m messing this up a lot and there is probably an easier way.
Screen Shot 2021-02-03 at 1.08.17 AM


Did you set the proximity prompt’s style into custom?

1 Like

so it should work inside a group?

You should put it inside a part.