I have this button where I click it, the server script goes and executes the code below. The thing is the GUI only pops up once and remains out of the screen. Anything stands out? There are no errors so I have no clue what's going on. The only other code I have attached to this is when the GUI pops up, you can click the X and it goes back down.
local Inventory
local Slots = game.Workspace.Map.SlotMachines.SlotMachine1
local SpinModule = require(game.ServerScriptService.ModuleScript)
script.Parent.MouseClick:Connect(function(player)
local slotmachine = script.Parent.Parent.Parent.Parent
local char = player.Character
local Humanoid = player.Character.Humanoid
if player.leaderstats.Chips.Value == 0 then
player.PlayerGui.OutOfCash.Gradient:TweenPosition(
UDim2.new(0.5, 0, 0.499, 0), --End Position
"Out",
"Sine", --Easing Style
1, --Time in seconds
false -- override any other tweens
)
print("Not enough chips!")
return
end

2 comments
Maybe if you add a close button you can click on and the "Gui" disappears. That might work. If not try adding a "wait(amount)" after the tweenservice that makes the "Gui" pop up and after that "wait(amount)" add some lines of code that make the "Gui" disappear just like that. If what I said made no sense then sorry, i'm just trying to help here bud.
if you can, please make a video of the bug