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

When player respawn, gui removes?

local id = xxxxxxxx
local plr = game.Players.LocalPlayer
local RadioGUI = game.ReplicatedStorage.RadioGUI

game:GetService("MarketplaceService").PromptGamePassPurchaseFinished:Connect(function(plr,ido,purchased)
	if purchased and ido == id then
		if not plr.PlayerGui:FindFirstChild(RadioGUI.Name) then
          RadioGUI:Clone().Parent = plr.PlayerGui --Clone gui to player
	end
  end
end)

game.Players.PlayerAdded:connect(function(plr)
	plr.CharacterAdded:connect(function(char)
 if game:GetService("MarketplaceService"):UserOwnsGamePassAsync(game.Players[char.Name].UserId, id) then
		if not plr.PlayerGui:FindFirstChild(RadioGUI.Name) then
          RadioGUI:Clone().Parent = plr.PlayerGui --Clone gui to player
	end
		end
end)
end)

where is problem please help me! this is a gamepass script

1 answer

The ScreenGui Instance have The property ResetOnSpawn (bool) if you want your GUIs to keep even if the player dies and respawn you have to set that property to false.

Just click RadioGUI and make sure it is set to FALSE

8 comments

0

i did it in a gamepass (Resetonrespawn is true)

0

the problem is with gamepass script not with gui!

0

lol i wrote the answer wrong

0

xd

0

ok i edited my answer

0

i should do it false?

0

yes it must be set to false if you don't want it to dissapear after a player's death

0

k tysm bro  it worked :) 

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