generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Error

Previous Thread :: Next Thread 
captinsoap is not online. captinsoap
Joined: 24 Jan 2010
Total Posts: 9570
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
Duelingwarlord is not online. Duelingwarlord
Joined: 15 Feb 2010
Total Posts: 22333
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
captinsoap is not online. captinsoap
Joined: 24 Jan 2010
Total Posts: 9570
11 Feb 2014 03:44 AM
i cant get output online





Report Abuse
Duelingwarlord is not online. Duelingwarlord
Joined: 15 Feb 2010
Total Posts: 22333
11 Feb 2014 03:49 AM
http://www.roblox.com/Remote-Error-Monitor-Script-item?id=104369320
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image