Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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.

1 comment

0

I don't believe there's an event for reset, but you can go ahead and make your own reset button.

1 answer

**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)

3 comments

0

Hope this helps!

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.

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

This discussion is preserved as it was. New answers, comments, and votes are closed.