Gui keeps resetting when character dies but resetonspawn is off

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!

  2. What is the issue? Include screenshots / videos if possible!
    I set the text of the gui to be the value of an int value and it works but when i die the gui goes back to a default of 0
    script changing the value:

prompt.Triggered:Connect(function(player)
	script.Parent["Valve Open"]:Play()
	
	game.ReplicatedStorage.Remotes.UpdateValve:FireAllClients()
	goalOpen.CFrame = hinge.CFrame * CFrame.Angles(math.rad(90), 0, 0)
	player.PlayerGui.MainGui.Valves.Frame.count.Value += 1
	player.PlayerGui.MainGui.Valves.Frame.touch.Text = player.PlayerGui.MainGui.Valves.Frame.count.Value

Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.

We’re going to need to know a little more to find out where you went wrong.

What is working as expected? What’s not working as expected? Do you update this value anywhere else? Is it bound to something? Something on your end is being done wrong.

the value updating works completely fine, the value of the gui is bound to an int value in the gui. the value is only updated when you activate a proximity prompt (there is multiple)

Show me the structure of the relevant files, the gui with ResetOnSpawn toggled off, as well as any relevant gui script.

There’s nowhere enough for me to go on. I’m not a magician unfortunately.

image
(the script is within a model in the workspace)

image

What is MainGui? Show me that real quick

image

Aight nice, thats your issue. You cant put the screengui into something else, because then the resetonspawn property won’t matter. The folder is reset each time, so all the children within get reset with it.

3 Likes

let me see if it works
hang in there

thank you so much, this will fix so many other bugs too

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.