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

wait(7)
local cscript = script:WaitForChild("CutsceneScript")
if script:findFirstChild("SkipCutsceneGuiValue") then
    script.SkipCutsceneGuiValue.Parent = cscript
    script.SkipCutsceneGui.Parent = cscript
end

function onPlayerEntered(player)
    repeat wait () until player.Character
    local new_script = script.CutsceneScript:clone()
    new_script.Parent = player.Character
    new_script.Disabled = false
end

game.Players.PlayerAdded:connect(onPlayerEntered)
onPlayerEntered(game.Players:WaitForChild("Player1")) -- Has to be done since it doesn't work offline for some reason.

another one

wait(9)
script.Hit:Play()
script.OuchSound:Play()
wait(2)
script.DeathSound:Play()
wait(11.6)

still more

wait(18.8)
script.parent.visible = true
wait(10)
script.parent.visible = false

again

wait(7)
script.parent.visible = false

same code i used for two scripts

wait(7)
script.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