Hello. I want to make a GUI tween using Proximity Prompts for a shop. I want it so when the Proximity Prompt finished, it will tween the GUI to the screen and able to go to the shop and do it again when the player is finished.
I used this script in the proximity prompt.
local prompt = script.Parent
local open = false -- debounce lol
prompt.Triggered:Connect(function(player)
local playerGui = player:WaitForChild("PlayerGUI")
local screenGui = playerGui.Shop
local frame = screenGui.Gradient
if open == false then
open = true
frame:TweenPosition(UDim2.new(0.178, 0, 0.108, 0))
else
open = false
frame:TweenPosition(UDim2.new(0.178, 0, 1, 0))
end
end)
I also have a local script in the GUI that closes it (X), but it works.
I used this tutorial