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

Troubles with audio?

Asked by 8 years ago
local replicatedstorage = game:GetService("ReplicatedStorage")
local status = replicatedstorage:WaitForChild("Textchange")
Playing = game.Workspace.Playing
Waiting = game.Workspace.Waiting

while true do

Waiting:Play()
Playing:Pause() 
while game.Players.NumPlayers > 2 do
status.Value = "Two players are required"
repeat wait(2) until game.Players.NumPlayers >= 2
end

wait(1)

status.Value = "Teleporting to the color base..."
wait(5)

game.Workspace.Randomcolors.Disabled = false
script.Parent.Script.Disabled = true
Playing:Play()
Waiting:Pause()


status.Value = "You have 1 minute to survive!"
wait(60)

script.Parent.Script.Disabled = false
game.Workspace.Randomcolors.Disabled = true
status.Value = "Game Over!"
wait(2)




end

Output: 12:25:37.917 - Auto-Saving... Loaded gloo library. Type _G.gloo.Help() for help. 12:25:42.527 - Playing is not a valid member of Workspace 12:25:42.528 - Script 'ServerScriptService.Script', Line 3 12:25:42.529 - Stack End

0
Try to use Playing = game.Workspace:WaitForChild("Playing") Nick1482 50 — 8y

1 answer

Log in to vote
0
Answered by
rexbit 707 Moderation Voter
8 years ago
Edited 8 years ago

Note: This was answered already through the Community Chat

WaitForChild would help. Either Playing hasn't fully loaded, or the location setted in the variable is incorrect due to misconception of the object's positioning in the workspace.

Playing = workspace:WaitForChild("Playing") -- for line three.
Ad

Answer this question