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

On Entered Player, Wait till player is actually ready?

Asked by 8 years ago

This script here does its magic thing and gives this player a cutscene script. But none of that is important. I am needing this to only give it to that specific player when he/she is ready. Like I have BC so its good for me, but what about my players who aren't? Like is a advertisement pops up and while the ad is playing, the game is running. This causes the players to not be able to experience the cutscene. Which makes me sad.

Here is the script:

local cscript = script:WaitForChild("CutsceneScript")

function onPlayerEntered(player)
    wait(2)
    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("player"))
0
Honestly, I'd do a menu/play button. HungryJaffer 1246 — 8y
0
Its funny because i have a menu that pops up right after it finishes CarterTheHippo 120 — 8y

Answer this question