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 .
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 .
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
This is the full script
What you would have to do is when the Character is added, you have it do whatever it is you want it to do.
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.
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)
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.
I appreciate the help, but I forgot to state that this script is a local script
Okay, I would still try this script and see if it does as you please.
This discussion is preserved as it was. New answers, comments, and votes are closed.
1 comment
What is script.Parent.Parent? What is script.Parent.Click? Is it a localscript or a server script? Where is it located?