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

How would I make this play when the player respawns?

Asked by
Nump4d 5
3 years ago
Edited 3 years ago

Please provide more explanation in your question. If you explain exactly what you are trying to accomplish, it will be much easier to answer your question correctly.


script.Parent.Parent.Enabled = true local text = ">LOCATION [REDACTED]" for i = 1, #text do script.Parent.Text = string.sub(text, 1, i) script.Parent.Click:Play() script.Parent.Parent.Enabled = false

Here is the script so far .

0
What is script.Parent.Parent? What is script.Parent.Click? Is it a localscript or a server script? Where is it located? Amiaa16 3227 — 3y

2 answers

Log in to vote
0
Answered by 3 years ago

Explanation

What you would have to do is when the Character is added, you have it do whatever it is you want it to do.


Error in the Code

For one, you don't have to have the script disable for something like this. All you need is for it to run off of when the character is placed again. You forgot an end for your for do code.


The Code

Player.PlayerAdded:Connect(function(Player)
    Player.CharacterAdded:Connect(function(character)
        local text = ">LOCATION [REDACTED]"
            for i = 1, #text do
            script.Parent.Text = string.sub(text, 1, i)
            script.Parent.Click:Play()
        end --You forgot this end in your original code
    end)
end)
0
I will note that this may not work as I don't exactly know what you're trying to do, however this should do whatever it is you want it to do when the person resets and their character is added to the game again. Just2Terrify 566 — 3y
0
I appreciate the help, but I forgot to state that this script is a local script Nump4d 5 — 3y
0
Okay, I would still try this script and see if it does as you please. Just2Terrify 566 — 3y
Ad
Log in to vote
0
Answered by 3 years ago

Since i don't have all the code, I can just give you an answer, you could add a string that will wait for the character to die and then it would happen. Don't accept my answer if it doesn't help

0
This is the full script Nump4d 5 — 3y

Answer this question