-
What do you want to achieve?
getting a lever to open a door -
What is the issue?
The proximity prompt is not showing up…
-
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
proximityprompt.Triggered:Connect(function()
if debounce == true then
debounce = false
if opened.Value == true then
opened.Value = false
tweenService:Create(frame,TweenInfo.new(.35),{CFrame = OffLever.CFrame}):Play()
else
opened.Value = true
tweenService:Create(frame,TweenInfo.new(.35),{CFrame = OnLever.CFrame}):Play()
end
wait(.30)
debounce = true
end
end)
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.