i want three GUI frames that look like this: https://gyazo.com/af575e66f3fb4b0b69498ed35fbd7394 and it's confusing me on how i can make it so if there's a GUI in the 1st position when another GUI is triggered, it goes on top of it and also if one disappears, the other moves into place. here's my script
local debounce = 0
function eventHappens(hit)
if debounce == 0 then
print('cp1 success')
debounce = 1
local check = hit.Parent:FindFirstChild("Humanoid")
if check ~= nil then
print('cp2 success')
user = game.Players:GetPlayerFromCharacter(hit.Parent)
print('cp3 success')
guis = 0
if guis == 0 then
guis = 1
script.Parent.Parent.Parent.POS1.Visible = true
script.Parent.Parent.Parent.Enabled = true
script.Parent.Text = string.format(user.Name.." has robbed $50,000 from the bank")
wait(5)
script.Parent.Parent.Parent.Enabled = false
wait(10)
guis = 0
end
elseif guis == 1 then
guis = 2
script.Parent.Parent.Parent.POS2.Visible = true
script.Parent.Parent.Parent.Enabled = true
script.Parent.Text = string.format(user.Name.." has robbed $50,000 from the bank")
wait(5)
script.Parent.Parent.Parent.Enabled = false
wait(10)
guis = 1
elseif guis == 2 then
guis = 3
script.Parent.Parent.Parent.POS3.Visible = true
script.Parent.Parent.Parent.Enabled = true
script.Parent.Text = string.format(user.Name.." has robbed $50,000 from the bank")
wait(5)
script.Parent.Parent.Parent.Enabled = false
wait(10)
guis = 2
end
debounce = 0
end
end
game.Workspace.BankMoneyGiver.Head.Touched:connect(eventHappens)
