Script works but for some reason it has a very long debounce??? [SOLVED]
Asked by
4 years ago Edited 4 years ago
This question has been solved by the original poster.
I made a text script for dialogue, It works perfectly but the only problem is when its finished
it has a debounce i never specified which is extremely long
i dont understand why it does so can you guys help me understand?
here is the starting script
01 | script.Parent.Touched:Connect( function (part) |
03 | local plr = game.Players:GetPlayerFromCharacter(part.Parent) |
07 | plr:WaitForChild( "PlayerGui" ).Text.Enabled = true |
08 | local msg = "Howdy folks" |
11 | local Texty = plr:WaitForChild( "PlayerGui" ).Text.TextLabel |
13 | Texty.Text = string.sub(text, 1 ,i) |
14 | local cor = coroutine.wrap( function () |
15 | local sound = Instance.new( "Sound" ) |
18 | sound.Parent = plr:WaitForChild( "PlayerGui" ).ScreenGui |
29 | plr:WaitForChild( "PlayerGui" ).ScreenGui.Enabled = true |
Here is the script that handles the real dialogue and u talking also
01 | local line = script.Parent.Value.Value |
02 | script.Parent.MouseButton 1 Click:Connect( function () |
04 | script.Parent.Parent.Enabled = false |
05 | local msg = "This is a test" |
07 | local plr = game.Players.LocalPlayer |
08 | local Texty = script.Parent.Parent.Parent.Text.TextLabel |
09 | Texty.Parent.Enabled = true |
11 | Texty.Text = string.sub(text, 1 ,i) |
12 | local cor = coroutine.wrap( function () |
13 | local sound = Instance.new( "Sound" ) |
16 | sound.Parent = script.Parent.Parent |
27 | script.Parent.Parent.Enabled = true |
28 | script.Parent.Text = "Want more?" |
31 | script.Parent.Parent.Enabled = false |
32 | local msg = "Idk im broke" |
34 | local plr = game.Players.LocalPlayer |
35 | local Texty = script.Parent.Parent.Parent.Text.TextLabel |
36 | Texty.Parent.Enabled = true |
38 | Texty.Text = string.sub(text, 1 ,i) |
39 | local cor = coroutine.wrap( function () |
40 | local sound = Instance.new( "Sound" ) |
43 | sound.Parent = script.Parent.Parent |
57 | script.Parent.Parent.Enabled = false |
58 | script.Parent.Parent.Parent.Text.Enabled = false |
i would appreciate it alot if u take ur time to read this and help me thanks