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 shows no reaction

Previous Thread :: Next Thread 
ColonySimulator is not online. ColonySimulator
Joined: 05 Jul 2015
Total Posts: 1721
30 Apr 2016 08:19 PM
So here I made a code for a round engine for my game ,but for some reasons , it doesnt react, doesnt show any error or anything in all the output(client and server). It supposed to give players role for the game etc.




local Time = 10
local Round = Instance.new("BoolValue",game.ServerStorage)
local DictatorValue = Instance.new("StringValue",game.ServerStorage)
DictatorValue.Name = "Dictator"
DictatorValue.Value = ""
Round.Name = "Round"
Round.Value = false

function SetRole()
local Players = game.Players:GetChildren()
repeat wait() until #Players > 1
local Crib = game.Players:GetChildren()
Dictator = Players[math.random(1,#Crib)]
DictatorValue.Value = Dictator.Name
print(Dictator.Name .. " is the dictator.")
GetGui()
end

while wait() do
if Round.Value == false then
Round.Value = true
NewGame()
SetRole()
ShowDictator()
print("New game")
repeat
wait(60)
Time = Time - 1
until
Time == 0 or Time <= 0
Reset()
print("End of game")
wait(1)
Time = 10
Round.Value = false
end
end
Report Abuse
ColonySimulator is not online. ColonySimulator
Joined: 05 Jul 2015
Total Posts: 1721
01 May 2016 10:39 AM
13 views , no replies. Help plz.
Report Abuse
ColonySimulator is not online. ColonySimulator
Joined: 05 Jul 2015
Total Posts: 1721
01 May 2016 10:52 AM
Do , you just read it and copy it? Still waiting for help!
Report Abuse
BanTech is not online. BanTech
Joined: 31 Dec 2015
Total Posts: 886
01 May 2016 10:55 AM
You've not even given us all the code, so how are we meant to find the error? The loop you've sent seems okay but it references loads of functions that we can't see, so the problem is probably with one of those functions.
Report Abuse
ColonySimulator is not online. ColonySimulator
Joined: 05 Jul 2015
Total Posts: 1721
01 May 2016 10:56 AM
The others part of the code is just graphic , the others function work properly I've tested them before I changed these scripts. These are the only script not working.
Report Abuse
DayxDreams is not online. DayxDreams
Joined: 08 Jan 2015
Total Posts: 443
01 May 2016 10:56 AM
just add print statements to random lines of your script
then go ingame and see how far it goes so you can locate where the issue is


does not compute
Report Abuse
ColonySimulator is not online. ColonySimulator
Joined: 05 Jul 2015
Total Posts: 1721
01 May 2016 11:03 AM
I think my error is with this part ,because I want more than 1 player in the game and since I changed this, the whole script broken. Help please, I want to keep verifying until there more then 1 player who join..

function SetRole()
local Players = game.Players:GetChildren()
repeat wait() until #Players > 1
local Crib = game.Players:GetChildren()
Dictator = Players[math.random(1,#Crib)]
DictatorValue.Value = Dictator.Name
print(Dictator.Name .. " is the dictator.")
GetGui()
end
Report Abuse
iJacobness is not online. iJacobness
Joined: 20 Jan 2014
Total Posts: 4944
01 May 2016 11:07 AM
"DictatorValue.Value = Dictator.Name"
math.random(1,#Crib) will only give you a number, try

DictatorValue.Value = Players[Dictator]


Report Abuse
ColonySimulator is not online. ColonySimulator
Joined: 05 Jul 2015
Total Posts: 1721
01 May 2016 11:14 AM
I found a way how to fix this.
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