I'm working on my killed by GUI and for some reason, it wouldn't fade out after fading in. I got rid of the entire fade-out loop and just made it disappear but it still wouldn't go away. I was trying to have it disappear once the player respawns but that wouldn't work either. I plan to have this repeat every time the player is killed, not sure if that'd work though because it doesn't disappear. Thanks in advance!
At the moment I have it fade in, display the player's killer, and disappear. (Stays and doesn't go away)
LocalScript > TextLabel > ImageLabel > Frame > ScreenGui
The code below is a local script under the TextLabel.
local event = game.ReplicatedStorage.KilledEvent
local player = game.Players.LocalPlayer
local character = player.Character
local humanoid = character.Humanoid
script.Parent.Parent.ImageTransparency=1
script.Parent.Parent.Parent.Visible=false
event.OnClientEvent:Connect(function(plr, killerName)
if killerName and plr.Name then
if plr.Name == character.Name then
script.Parent.Text=killerName
script.Parent.Parent.Parent.Visible=true
repeat
script.Parent.Parent.ImageTransparency = script.Parent.Parent.ImageTransparency - 0.05
wait(0.1)
until script.Parent.Parent.ImageTransparency == .3
wait(6)
script.Parent.Parent.ImageTransparency=1
script.Parent.Parent.Parent.Visible=false
end
end
end)
