Need help with Topbar icon (Again)

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!
    fix the topbar
  2. What is the issue? Include screenshots / videos if possible!
    the issue is that when i reset my character the topbar icon multiplies and becomes two
  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    Idk what to do
    After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
local Icon = require(game:GetService("ReplicatedStorage").Icon)
local player = game.Players.LocalPlayer
local icon = Icon.new()
icon:setImage(5107166345)
icon:setLeft()
icon.deselected:Connect(function()
	script.Parent:WaitForChild("KillFeedGui").KillFeedFrame.Visible = false
end)
icon.selected:Connect(function()
	script.Parent:WaitForChild("KillFeedGui").KillFeedFrame.Visible = true
end)

Note:this script is placed inside startergui and im using TopBar Icon module v2

I recommend you put it under StarterPlayerScripts or under a GUI object which has the “ResetOnSpawn” option (or whatever it is called) disabled. When something is under StarterGui, it will be re-created every time the player loads (so after they die). Not 100% sure how this icon module works, but if it is a duplication problem, then that should fix it.

1 Like

it worked!!! thanks 30 cha_____

1 Like