When player touches part the script isn't working so that the TypeWriting code resets and starts again?

So basically I have a Typewriting code for a text label, and I have a code so when I touch a part the TypeWrite script will continue again but I’m being given this error code after trying to fix the code.
Players.WaterCanxiety.PlayerGui.ScreenGui.Frame.TextLabel.LocalScript:21: invalid argument #3 (string expected, got nil)

Here is the code for the Typewriting:

Here is the code for the part (there is a remote event in replicated storage) :

I’m not a scripter and only do basic things so this is out of my field of knowledge.
Thank you!

you wrote in first image :WaitForChild(“TypeWriter”)) it should be like this :WaitForChild(“TypeWriter”)

1 Like

hope i helped you be more attentive next time

I tried using it without that but the script doesn’t function at all without it.
Do you know how when I touch the part it signals that so it resets the typewritten script so I can continue doing messages??

does it give any errors ? or something

When I touch the part (ResetTypeWritten) no errors occur in the output and the typewrite doesn’t continue

Here is the ResetTypeWrites Code: script.Parent.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild(“Humanoid”) ~= nil then
game.ReplicatedStorage.RemoteEvent:FireClient(game.Players:GetPlayerFromCharacter(hit.Parent))
end
end)
(There is a remoteevent in replicated storage btw)

Actually never mind I figured it out but thank you for the hlep!

1 Like