Gui not working the same after resetting

I have no clue why this is happening, can someone help me? Thanks

newTemplate.MouseEnter:Connect(function()
	for i, v in pairs(ArmorModule.rarities) do
		if table.find(ArmorModule.armors["Legendary"], newRandomArmor) then
				newInfo.Visible = true
				newInfo.Template.Text = armorname
				newInfo.attack.Text = "Attack: "..legendVal
				player:WaitForChild("Data").EquippedValue.Value = legendVal
				newInfo.Coins.Text = "Coins : "..sellvalleg
			elseif table.find(ArmorModule.armors["Epic"], newRandomArmor) then
				newInfo.Visible = true
				newInfo.attack.Text = "Attack: "..epicval
				newInfo.Template.Text = armorname
				player:WaitForChild("Data").EquippedValue.Value = epicval
				newInfo.Coins.Text = "Coins : "..sellvalepic
				
			end
		end
		newTemplate.MouseLeave:Connect(function()
			newInfo.Visible = false
		end)
		newTemplate.MouseMoved:Connect(function()
			newInfo.Position = UDim2.new(0,Mouse.X,0,Mouse.Y)
		end)
	end)

Is the ScreenGui ResetOnSpawn Variable enabled or disabled.

1 Like

It is disabled

Turn the ResetOnSpawn variable within the ScreenGui on, and test it, it should work.

When i did that my whole inventory broke and nothing worked

Are the scripts in StarterPlayerScripts or StarterCharacterScripts?

If you want the scripts to reset on spawn as well place them into StarterCharacterScripts

it’s in startergui