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

Why wont my scripts wait? There doesnt seem to be anything wrong

Asked by 3 years ago
Edited 3 years ago

OK so. the problem here is that I tell my scripts to wait a bit and then do something but they do nothing and stay as what I set them to in their properties for the guis and the scripts just don't listen here is all the script code

one of the scripts

01wait(7)
02local cscript = script:WaitForChild("CutsceneScript")
03if script:findFirstChild("SkipCutsceneGuiValue") then
04    script.SkipCutsceneGuiValue.Parent = cscript
05    script.SkipCutsceneGui.Parent = cscript
06end
07 
08function onPlayerEntered(player)
09    repeat wait () until player.Character
10    local new_script = script.CutsceneScript:clone()
11    new_script.Parent = player.Character
12    new_script.Disabled = false
13end
14 
15game.Players.PlayerAdded:connect(onPlayerEntered)
16onPlayerEntered(game.Players:WaitForChild("Player1")) -- Has to be done since it doesn't work offline for some reason.

another one

1wait(9)
2script.Hit:Play()
3script.OuchSound:Play()
4wait(2)
5script.DeathSound:Play()
6wait(11.6)

still more

1wait(18.8)
2script.parent.visible = true
3wait(10)
4script.parent.visible = false

again

1wait(7)
2script.parent.visible = false

same code i used for two scripts

1wait(7)
2script.parent.visible = false
0
Same Happened To My Script On Wait IT Just Stops Working kidsteve923 139 — 3y
0
.Visible not .visible - and what are those wait(7)'s for? WideSteal321 773 — 3y

1 answer

Log in to vote
0
Answered by 3 years ago

try to put the wait(1) and do it in everyplace

0
I think i dont have this problem anymore. thanks to the people who might have tried to help though AllenBatman666 30 — 3y
Ad

Answer this question