I was playtesting my game and noticed that when my character dies, the topbar icons duplicate.
I wouldn’t know where to start looking.
All I have tried so far is removing a cutscene script and another free model script that I thought could cause the problem.
I am super unfamiliar with a lot of roblox terms so I may need some better explaining if I’m not understanding things.
August 4, 2021, 11:50pm
Suggested you keep scripts that are intended to run once on player join in places like StarterPlayerScript or inside a ScreenGui with the ScreenGui ‘ResetOnRespawn’ turned off so it won’t run again.
Where is your code that adds the buttons? You might have put in StarterCharacterScripts, so it runs every time a character is added. If you did put it in StarterCharacterScripts, try moving it to StarterPlayerScripts
I’m using TopbarPlus which automatically added scripts for me. Nothing is in StarterCharacterScripts though.
I believe you should have some code that looks like this:
local Icon = require(game:GetService("ReplicatedStorage").Icon)
local newIcon = Icon.new()