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
idk if this works, but i saw problems with your scripts
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(UDim2.new(0.5, 0, 0.499, 0), "Out", "Sine", 1, false) print("Not enough chips!") end end
if it doesn't work then dm me on Blue Duck#9891
Sorry guys turns out it was because I enabled the Tweenservice on a server script, and tried to close it with a Localscript, all I had to do was change the LocalScript to a ServerScript, thanks for trying to answer with my horrible explanation.