Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

I would like my ScreenGui to hold a specific text for a few seconds?

Asked by 5 years ago
Edited 5 years ago

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)
0
When you concatenate your string it prints the same player name twice. It would look like "insanepryo1337 Defeated insanepryo1337." DeceptiveCaster 3761 — 5y
0
How would I go about fixing this? insanepryo1337 -5 — 5y

Answer this question