Try this: Forgot to re-address reply. Sorry, goldenstein64.
local debounce = false
local function click()
if debounce then
return
end
debounce = true
-- start code here
local UI = script.Parent.Parent.Parent -- easier to handle
local Clothing = UI.Parent.Clothing
script.Buy:Play()
UI:TweenPosition(UDim2.new(-0.02, 0, -1, 0), "Out", "Quad", 1, true)
wait(1)
UI.Visible = false
Clothing.Visible = true
Clothing:TweenPosition(UDim2.new(-0.02, 0, 0), "In", "Bounce", 1, true)
wait(1)
debounce = false
end
script.Parent.MouseButton1Click:Connect(click)