char = game.Workspace["Hamood Summoner"].Major -- the npcs humanoid ignore the name local textoutlinetransparency = script.Parent.TextStrokeTransparency local TextTransparency = script.Parent.TextTransparency script.Parent.Text = game.Workspace["Hamood Summoner"].Name if char.Died:Connect(function() wait(0.05) textoutlinetransparency = 0.7 TextTransparency = 0.7 wait(0.05) textoutlinetransparency = 0.8 TextTransparency = 0.8 wait(0.05) textoutlinetransparency = 0.9 TextTransparency = 0.9 wait(0.05) textoutlinetransparency = 1 TextTransparency = 1 end) then end
i made a script thats supposed to make the text which is supposed to be the overhead name quickly disappear when the humanoid dies but i used the variables to make it less messy and now the text won't become more transparent when the npc dies is there solution to this? i tried not using locals btw
maybe i was wrong but i never see anyone put if before an event, try this below, also it seems like die is an event of humanoid not character
char.Humanoid.Died:Connect(function() wait(0.05) textoutlinetransparency = 0.7 TextTransparency = 0.7 wait(0.05) textoutlinetransparency = 0.8 TextTransparency = 0.8 wait(0.05) textoutlinetransparency = 0.9 TextTransparency = 0.9 wait(0.05) textoutlinetransparency = 1 TextTransparency = 1 end)
char = game.Workspace["Hamood Summoner"].Major -- the npcs humanoid you can change the name to the npcs current name and humanoid name text = script.Parent script.Parent.Text = game.Workspace["Hamood Summoner"].Name char.Died:Connect(function() -- function that gets called when the npc poops itself wait(0.05) text.TextStrokeTransparency = 0.7 text.TextTransparency = 0.7 wait(0.05) text.TextStrokeTransparency = 0.8 text.TextTransparency = 0.8 wait(0.05) text.TextStrokeTransparency = 0.9 text.TextTransparency = 0.9 wait(0.05) text.TextStrokeTransparency = 1 text.TextTransparency = 1 end)
turns out i fixed it by myself all i had to do was just make a variable for specifying the text itself it wasn't the event but the variables