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 » Scripters
Home Search
 

Re: Script not looping

Previous Thread :: Next Thread 
Coinman001 is not online. Coinman001
Joined: 10 Apr 2012
Total Posts: 56149
04 Apr 2015 07:04 PM
---[[ DECLARING FUNCTIONS ---]]
local function getspecial()
local p = game.Players:GetPlayers()
local rndom1 = table.remove(p,math.random(1,#p))
local rndom2 = table.remove(p,math.random(1,#p))
return rndom1,rndom2
end
local function moveAll()
for i,v in pairs(game.Players:GetChildren()) do
v.Character:MoveTo(Vector3.new(46.2 + math.random(5), 75, (-42.6 + math.random(10))))
wait()
end
end

--[[[ VARIABLE DECLARATIONS ---]]
local isnotgame = true
local gametime = script.Value
local gun = game.ReplicatedStorage.Revolver
local knife = game.ReplicatedStorage.Knife
local car = true

--[[ ACTUAL CODE ]]--
repeat
if isnotgame then
if game.Players.NumPlayers > 1 then
isnotgame = false
wait(3)
gametime.Value = 120
moveAll()
local murderer, sheriff = getspecial()
gun:Clone().Parent = sheriff.Backpack
knife:Clone().Parent = murderer.Backpack
for i= gametime, 0, -1 do
wait(1)
gametime.Value = i
gametime.Changed:connect(function()
game.StarterGui.ScreenGui.TextLabel.Text = "time left:"..i
end)
if gametime.Value == 0 or murderer.Character.Humanoid.Health == 0 then
for i,v in pairs(game.Players.NumPlayers) do
v.Character.Humanoid.Health = 0
end
isnotgame = true
end
end
end
end
wait(5)
until car == false

Thread By, Coinman001
Report Abuse
mycheeze is not online. mycheeze
Joined: 27 Jun 2011
Total Posts: 6748
04 Apr 2015 07:07 PM
#1, stop trying to make a murderer game

#2, the last thing we need is a script to handpick problems from without an output

#3, stop wearing that dreaded shaggy

#4, did you seriously remake the thread just to fix the title and include the variable declaration instead of doing this the first time?

#5, nothing, I just like #5, its kinky
Report Abuse
Coinman001 is not online. Coinman001
Joined: 10 Apr 2012
Total Posts: 56149
04 Apr 2015 07:08 PM
murder game is a test

no output errors noob

shaggys 4 lief

Thread By, Coinman001
Report Abuse
mycheeze is not online. mycheeze
Joined: 27 Jun 2011
Total Posts: 6748
04 Apr 2015 07:09 PM
no help 4 u then <3
Report Abuse
Coinman001 is not online. Coinman001
Joined: 10 Apr 2012
Total Posts: 56149
04 Apr 2015 07:10 PM
ok im sorry shaggy is bad

Thread By, Coinman001
Report Abuse
Coinman001 is not online. Coinman001
Joined: 10 Apr 2012
Total Posts: 56149
04 Apr 2015 07:20 PM
adsf

Thread By, Coinman001
Report Abuse
Coinman001 is not online. Coinman001
Joined: 10 Apr 2012
Total Posts: 56149
04 Apr 2015 07:22 PM
fasd

Thread By, Coinman001
Report Abuse
Coinman001 is not online. Coinman001
Joined: 10 Apr 2012
Total Posts: 56149
04 Apr 2015 07:23 PM
dasf

Thread By, Coinman001
Report Abuse
Coinman001 is not online. Coinman001
Joined: 10 Apr 2012
Total Posts: 56149
04 Apr 2015 07:28 PM
asdf

Thread By, Coinman001
Report Abuse
Coinman001 is not online. Coinman001
Joined: 10 Apr 2012
Total Posts: 56149
04 Apr 2015 07:30 PM
dasf

Thread By, Coinman001
Report Abuse
Coinman001 is not online. Coinman001
Joined: 10 Apr 2012
Total Posts: 56149
04 Apr 2015 07:33 PM
adf

Thread By, Coinman001
Report Abuse
Coinman001 is not online. Coinman001
Joined: 10 Apr 2012
Total Posts: 56149
04 Apr 2015 08:18 PM
dfas

Thread By, Coinman001
Report Abuse
Bobbrige is not online. Bobbrige
Joined: 27 Jul 2010
Total Posts: 411
04 Apr 2015 08:19 PM
try replacing 'repeat' with 'while true do'
Report Abuse
Coinman001 is not online. Coinman001
Joined: 10 Apr 2012
Total Posts: 56149
04 Apr 2015 08:20 PM
ok

Thread By, Coinman001
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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