When Player dies and respawns the gui is suppose to go visible
local Players = game:GetService("Players") game.Players.PlayerAdded:Connect(function(Player) Player.CharacterAdded:Connect(function(Char) Char.Humanoid.Died:Connect(function() if Char.Humanoid.Health == 100 then Player.PlayerGui.MainUI.Enabled = true Player.PlayerGui.MoneyGui.Enabled = true end end) end) end)
I found a few errors on the script also you need to put a wait in there when the humanoid has 100 health because when the humanoid is still respawning the Gui goes visible. Here is the fixed script put it in serverscriptservice.
local Players = game:GetService("Players") game.Players.PlayerAdded:Connect(function(Player) Player.CharacterAdded:Connect(function(Char) Char.Humanoid.Died:Connect(function() if Char.Humanoid.MaxHealth == 100 then-- majour error you forgot to do MaxHealth wait(4)-- if you want to change this make the number greater than 4 because it takes about 3. something seconds to fully respawn Player.PlayerGui.MainUI.Enabled = true Player.PlayerGui.MoneyGui.Enabled = true end end) end) end)
Hope this helps!!