- What do you want to achieve? Keep it simple and clear!
I’d like the GUI Frame to be tweened out of view smoothly when the user clicks “no”.
- What is the issue? Include screenshots / videos if possible!
When the user opens the GUI menu it is tweened into view smoothly. When the user clicks No it tweens out smoothly as well, when the user goes back and tries to open the GUI menu (via proximity prompt) it doesn’t work the second time.
Proximity prompt script to OPEN then menu. This script is inside the proximitypromp. It is a server script.
local activatorProx = script.Parent
activatorProx.Triggered:Connect(function(plr)
local guiMenuFrame = plr:WaitForChild("PlayerGui"):WaitForChild("STOCK"):WaitForChild("Frame")
print("activated")
guiMenuFrame:TweenPosition(UDim2.new(0.279, 0, 0.736, 0), Enum.EasingDirection.InOut, Enum.EasingStyle.Quad, 0.6, true)
--wait(2)
--guiMenuFrame:TweenPosition(UDim2.new(0.278, 0, 1, 0), Enum.EasingDirection.InOut, Enum.EasingStyle.Quad, 0.6, true)
end)
This is the script inside the NO button which CLOSES the menu. it is a local script.
local button = script.Parent
local guiMenuFrame = script.Parent.Parent
button.MouseButton1Down:Connect(function(x, y)
guiMenuFrame:TweenPosition(UDim2.new(0.278, 0, 1, 0), Enum.EasingDirection.InOut, Enum.EasingStyle.Quad, 0.6, true)
end)
I cannot find out why this is happening. I’ll respond asap tomorrow to any possible solutions. Thank you!