i want this button to be able to press and for the proximityprompt to not be able to see. it doesnt give me any errors. If you need more info please ask
local highlight = script.parent:WaitForChild("Highlight")
local prompt = button:WaitForChild("ProximityPrompt")
highlight.FillTransparency = 1
highlight.OutlineTransparency = 1
local ts = game:GetService("TweenService")
local fadeti = TweenInfo.new(0.4, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut)
local ti = TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut)
local tween1 = ts:Create(button, ti, CFrame.new(0, -0.05, 0))
local tween2 = ts:Create(button, ti, CFrame.new(0, 0, 0))
local fadein = ts:Create(highlight, fadeti, {OutlineTransparency = 0.5})
local fadeout = ts:Create(highlight, fadeti, {OutlineTransparency = 1})
local debounce = false
prompt.PromptShown:Connect(function()
fadein:Play()
end)
prompt.PromptHidden:Connect(function()
fadeout:Play()
end)
prompt.Triggered:Connect(function()
if debounce == false then
debounce = true
prompt.Enabled = false
tween1:Play()
wait(0.2)
tween2:Play()
wait(1)
debounce = false
prompt.Enabled = true
if debounce == true then return end
end
end)```
** You are now Level 5! **