How do I make a gui permanently visible if a player is in a certain stage?
You could just set the ResetOnSpawn
property to false on the Gui when a Player touches a certain stagepoint
Well you could have an invisible part on each stage and inside a server script you could define the parts and when a certain part is touched, check if its a humanoid and if it is, fire a remote event. In the local script you could receive the remote event and make the GUI visible.
Hope I explained this clearly.
Let me know if you need anymore help
Yes, I understand but lets say that the player touches the part and proceedes to the next stage and then leaves the game how do I make the gui stay permanently visible for that one player?
Use billboard, .Adoorne = workspace:findfirstChild(“Stage”…StagePart.Value+=1)
I don’t know if ur new to scripting ,so I write it in confusing language.
If you want data to remain between sessions, you need to use Data stores to save the data and load it between sessions.
Could you help me using the data store to save the player GUIs?
Just use a simple DataStore like this:
local DataStoreService = game:GetService("DataStoreService")
game.Players.PlayerAdded:Connect(function(player)
local success, result = pcall(function()
local key = player.UserId
local showGuiStore = DataStoreService:GetDataStore("ShowGui", key)
return showGuiStore
end)
if success then
showGui = result
end
end)
game.Players.PlayerRemoving:Connect(function(player)
local success, result = pcall(function()
local key = player.UserId
local showGuiStore = DataStoreService:GetDataStore("ShowGui", key)
end)
if success == true then
--Saves the Gui.Visible value
showGuiStore:SetAsync(Gui.Visible)
end
end)
You would need to involve data storage for that player.