My brain has given up now, and I can’t get this issue:
with this code:
local Players = game.Players
local GUI = game.ReplicatedStorage.GUI
local LoadCharacterRE = game.ReplicatedStorage.RemoteEvents.LoadCharacter
Players.PlayerAdded:Connect(function(player)
local active = Instance.new("BoolValue")
active.Parent = player
active.Name = "Active"
local revive = Instance.new("BoolValue")
revive.Parent = player
revive.Name = "Revive"
for i,v in pairs(GUI:GetChildren()) do
v:Clone().Parent = player.PlayerGui
end
end)
LoadCharacterRE.OnServerEvent:Connect(function(Player)
local char = Player.Character
Player.Active.Value = true
Player.Revive.Value = false
Player:LoadCharacter()
if char then return end
for i,v in pairs(GUI:GetChildren()) do
if not Player.PlayerGui:FindFirstChild(v.Name) then
v:Clone().Parent = Player.PlayerGui
end
end
end)
fixed.
As you can see I am just making the guis of the character go in player gui for a menu but I am facing an issue where the menu does not load after one death.
Here is the menu:
Now I can not simply make it resetonspawn because doing that would cause issues as whenever I click play the remoteevent “LoadCharacter” fires and thus it will create a loop of menus that keep popping up.
Any Ideas?
Please do not hesitate on askinng me for more information.
Nevermind i found a fix that being if humanoid.health is greater than 0 in the menu handler script then ill simply return end it. But I would love to hear everyones ideas! <3
Did you bind the death screen to Humanoid.Died? If you simply connect it once, that humanoid will be destroyed and the function won’t be called anymore. I’d suggest putting a death script in StarterCharacterScripts.
Well just a simple janky game I am working on to improve my portfolio and improving my modelling capabilities with animation and building. It maybe will be complete?? I hope it will though!