|
| 11 Feb 2014 03:33 AM |
I'm making a script and I need to test it, it worked up until the died thing (since it wouldn't work on solo anyway)
I tried to play it online... nothing worked it stayed on "Not enough players"
hint = Instance.new("Hint") hint.Parent = Workspace hint.Name = "Hint"
repeat Workspace.Hint.Text = "Not Enough Players" until game.Players.NumPlayers >= 1 -- Say "Not Enough Players" until 2 people join hint.Text = "Enough Players!" --Yay! wait(1) hint.Text = "Starting Game..." wait(2) local maps = game.Lighting.Maps:GetChildren() --Pick A random map Map = maps[math.random(1, #maps)] hint.Text = "Map Selected: "..Map.Name local players = game.Players:GetChildren() Killer = players[math.random(1, #players)] -- Pick a Killer
local Value = Instance.new("IntValue",Workspace) -- Make the Alive Value Value.Name = "Alive" Value.Value = game.Players.NumPlayers Value.Value = Value.Value +1
for _, v in pairs (game:GetService('Players'):GetPlayers()) do local Alive = Instance.new("BoolValue") Alive.Parent = v Alive.Value = true Alive.Name = "Alive" Killer.Alive:Destroy() wait(5) hint.Text = "" v.Character.Torso.CFrame = CFrame.new(10,10,10) wait(15) hint.Text = "The Killer has found a knife" -- Got knife game.Lighting.Knife:Clone().Parent = Killer.Backpack wait(3) hint.Text = "" local KillerHint = Instance.new("Hint",Killer.PlayerGui) KillerHint.Text = "You're the killer! Ambush the others when they least expect it" -- Message displayed to the killer wait(5) KillerHint:Destroy() Timer = true -- Start the timer end
game:GetService('Players').PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(character) character:WaitForChild("Humanoid").Died:connect(function() if player.Alive.Value == true then player.Alive.Value = false game.Workspace.Alive.Value = game.Workspace.Alive.Value - 1 end end)
repeat wait() until game.Workspace.Alive.Value == 0 local killed = Instance.new("Hint",Workspace) killed.Text = "The Killer has killed everyone!" killed.Text = "The Killer was "..Killer.Name.."!"
end) end)
|
|
|
| Report Abuse |
|
|
| 11 Feb 2014 03:42 AM |
output?
Also, I recommend have a .Changed event for this instead: repeat wait() until game.Workspace.Alive.Value == 0 |
|
|
| Report Abuse |
|
| |
|
| 11 Feb 2014 03:49 AM |
| http://www.roblox.com/Remote-Error-Monitor-Script-item?id=104369320 |
|
|
| Report Abuse |
|