I have a ScreenGui that changes text often and I would like it to stay on 1 of those texts for a specific amount of time how would I go about that. The ScreenGui says Biding time for more players, Temporary Deferral, Let's get ready to rumble, (Countdown), example Defeated example, The battle has been won by example, and The match has ceased. I would like for "example Defeated example" to stay up for a few seconds instead of the countdown going then when someone gets a kill it only shows up for half a second I have attempted adding a variable and an "If" statement in the LocalScript to solve this issue.
I tried to get the character function from my PlayerData script and add a variable to my localscript to "call" the function, I guess that would be the word?
local getcharacter = game:GetService("ServerScriptService"):WaitForChild("PlayerData"):WaitForChild("character")
This is my function in the PlayerData script
player.CharacterAdded:Connect(function(character) character.Humanoid.Died:Connect(function() if character.Humanoid and character.Humanoid:FindFirstChild("creator")then game.ReplicatedStorage.Status.Value = tostring(character.Humanoid.creator.Value).." Defeated "..player.name end
The "If" statement I added
if Status.Value == player.Name.." Defeated "..player.Name then wait(5) end
Where I put my "If" statement
Status:GetPropertyChangedSignal("Value"):Connect(function() script.Parent.Text = Status.Value if Status.Value == player.Name.." Defeated "..player.Name then wait(5) end end)