Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How can I create a loading gui that ONLY loads when player enters?

Asked by 9 years ago

I'm not asking for the answer or script to this. I want to know how I can create a loading gui that would only be given to the player when they enter. If they reset, they won't get the gui again. If they do anything else, they won't get the gui again. The only time they'll get it is if they just entered the game.

HOWEVER, I want to force the gui to completely load and if you reset then the gui will still be there. I'm not sure if this is possible.

I'm not looking for a script to this or the answer. I just wanted to get pointed in the right direction, for instance: what methods would I use, what technique, etc? Please help.

0
I don't believe there's an event for reset, but you can go ahead and make your own reset button. aquathorn321 858 — 9y

1 answer

Log in to vote
0
Answered by 9 years ago

**ANYTHING ** is possible with code!

--Local script inside of StarterGui
--Assuming there's a boolvalue named "Reset" inside of StarterGui

local player = game.Players.LocalPlayer
local mouse = player:GetMouse()

mouse.KeyDown:connect(function(key)
if key:byte() == 8 and player.Character.Humanoid.Health > 0 then -- Kills the character when backspace is pressed
script.Parent.Reset.Value = true
player.Character.Humanoid.Health = 0
end
end)
--Script inside of ServerScriptService, or anywhere, really.
--Assuming GUI is named GUI and inside of ServerStorage

local bork = {}

game.Players.PlayerAdded:connect(function(player)
bork[player.Name] = true
bork[player.Name.."ded"] = false

    player.CharacterAdded:connect(function(character)
    if bork[player.Name] and not bork[player.Name.."ded"]  then
    local clone = game.ServerStorage.StillAlive:clone()
    clone.Parent = player.PlayerGui
    end

        character.Humanoid.Died:connect(function()
        bork[player.Name] = player.PlayerGui.Reset.Value
        if not bork[player.Name] then bork[player.Name.."ded"]  = true
        end
        end)
    end)
end)
0
Hope this helps! aquathorn321 858 — 9y
0
What? Why would you even need to check when backspace is called? Did you read my question because I don't see how this is helping. Arithmeticity 167 — 9y
0
'Course I did. read my comment under your question. There's no event for checking when a player resets, but we can make our own reset button using backspace aquathorn321 858 — 9y
Ad

Answer this question