I have tried to make a text when a door is clicked but now i have decided that i want to clone a screengui instead can someone give a script. I tried to use the clone() function before and has not worked. I have even used this and still it does not work.
this is the script
script.Parent.Text.Value = false local value = script.Parent.Text.Value workspace.doortext.ClickDetector.MouseClick:Connect(function() if game.StarterGui.ScreenGui.Value.Value == true then if workspace.Breakabl2.Anchored == true then if value == false then value = true script.Parent.Sound:Play() script.Parent.TextLabel.Text = "I" wait(0.2) script.Parent.TextLabel.Text = "I t" wait(0.2) script.Parent.TextLabel.Text = "I th" wait(0.2) script.Parent.TextLabel.Text = "I thi" wait(0.2) script.Parent.TextLabel.Text = "I thin" wait(0.2) script.Parent.TextLabel.Text = "I think" wait(0.2) script.Parent.TextLabel.Text = "I think I" wait(0.2) script.Parent.TextLabel.Text = "I think I c" wait(0.2) script.Parent.TextLabel.Text = "I think I can" wait(0.2) script.Parent.TextLabel.Text = "I think I can o" wait(0.2) script.Parent.TextLabel.Text = "I think I can op" wait(0.2) script.Parent.TextLabel.Text = "I think I can ope" wait(0.2) script.Parent.TextLabel.Text = "I think I can open" wait(0.2) script.Parent.TextLabel.Text = "I think I can open t" wait(0.2) script.Parent.TextLabel.Text = "I think I can open th" wait(0.2) script.Parent.TextLabel.Text = "I think I can open thi" wait(0.2) script.Parent.TextLabel.Text = "I think I can open this d" wait(0.2) script.Parent.TextLabel.Text = "I think I can open this do" wait(0.2) script.Parent.TextLabel.Text = "I think I can open this doo" wait(0.2) script.Parent.TextLabel.Text = "I think I can open this door" wait(0.2) script.Parent.TextLabel.Text = "" script.Parent.Sound:Stop() value = false end end end end)
Try using debounce:
local debounce = false workspace.doortext.ClickDetector.MouseClick:Connect(function() if workspace.Breakabl2.Anchored == true then if not debounce then debounce = true script.Parent.Sound:Play() script.Parent.TextLabel.Text = "I" wait(0.2) script.Parent.TextLabel.Text = "I t" wait(0.2) script.Parent.TextLabel.Text = "I th" wait(0.2) script.Parent.TextLabel.Text = "I thi" wait(0.2) script.Parent.TextLabel.Text = "I thin" wait(0.2) script.Parent.TextLabel.Text = "I think" wait(0.2) script.Parent.TextLabel.Text = "I think I" wait(0.2) script.Parent.TextLabel.Text = "I think I c" wait(0.2) script.Parent.TextLabel.Text = "I think I can" wait(0.2) script.Parent.TextLabel.Text = "I think I can o" wait(0.2) script.Parent.TextLabel.Text = "I think I can op" wait(0.2) script.Parent.TextLabel.Text = "I think I can ope" wait(0.2) script.Parent.TextLabel.Text = "I think I can open" wait(0.2) script.Parent.TextLabel.Text = "I think I can open t" wait(0.2) script.Parent.TextLabel.Text = "I think I can open th" wait(0.2) script.Parent.TextLabel.Text = "I think I can open thi" wait(0.2) script.Parent.TextLabel.Text = "I think I can open this d" wait(0.2) script.Parent.TextLabel.Text = "I think I can open this do" wait(0.2) script.Parent.TextLabel.Text = "I think I can open this doo" wait(0.2) script.Parent.TextLabel.Text = "I think I can open this door" wait(0.2) script.Parent.TextLabel.Text = "" script.Parent.Sound:Stop() wait(1) debounce = false end end end)
tell me if there is something wrong ok?
no it didn't is there a easier way like clone and also this is the script its the same way you sent me
local debounce = false workspace.doortext.ClickDetector.MouseClick:Connect(function() if workspace.Breakabl2.Anchored == true then if not debounce then debounce = true script.Parent.Sound:Play() script.Parent.TextLabel.Text = "I" wait(0.2) script.Parent.TextLabel.Text = "I t" wait(0.2) script.Parent.TextLabel.Text = "I th" wait(0.2) script.Parent.TextLabel.Text = "I thi" wait(0.2) script.Parent.TextLabel.Text = "I thin" wait(0.2) script.Parent.TextLabel.Text = "I think" wait(0.2) script.Parent.TextLabel.Text = "I think I" wait(0.2) script.Parent.TextLabel.Text = "I think I c" wait(0.2) script.Parent.TextLabel.Text = "I think I can" wait(0.2) script.Parent.TextLabel.Text = "I think I can o" wait(0.2) script.Parent.TextLabel.Text = "I think I can op" wait(0.2) script.Parent.TextLabel.Text = "I think I can ope" wait(0.2) script.Parent.TextLabel.Text = "I think I can open" wait(0.2) script.Parent.TextLabel.Text = "I think I can open t" wait(0.2) script.Parent.TextLabel.Text = "I think I can open th" wait(0.2) script.Parent.TextLabel.Text = "I think I can open thi" wait(0.2) script.Parent.TextLabel.Text = "I think I can open this d" wait(0.2) script.Parent.TextLabel.Text = "I think I can open this do" wait(0.2) script.Parent.TextLabel.Text = "I think I can open this doo" wait(0.2) script.Parent.TextLabel.Text = "I think I can open this door" wait(0.2) script.Parent.TextLabel.Text = "" script.Parent.Sound:Stop() wait(1) debounce = false end end end)