Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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

2 comments

0

Same Happened To My Script On Wait IT Just Stops Working

0

.Visible not .visible - and what are those wait(7)'s for?

1 answer

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

1 comment

0

I think i dont have this problem anymore. thanks to the people who might have tried to help though

This discussion is preserved as it was. New answers, comments, and votes are closed.