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: How did i do so far?

Previous Thread :: Next Thread 
CORGovernor is not online. CORGovernor
Joined: 12 Mar 2013
Total Posts: 45
30 May 2013 07:24 PM
-- My studio keeps crashing when i press play, it's doing this with all of my places i -- make, so i need someone to judge this for me please.

e = script.Parent.AIPlace.Value
while true do
wait()
d = math.Random(1,4)
script.Parent.AIPlace.Value.Value = d
if e > a then
-- What ever else
end
end


--[[

Its suppose to choose a random number between one and four, then it records the random number in it's stringvalue, next it compares it's Value to a's Value, its suppose to find if its bigger, and if it is then bla bla bla.
Report Abuse
CORGovernor is not online. CORGovernor
Joined: 12 Mar 2013
Total Posts: 45
30 May 2013 07:27 PM
bump
Report Abuse
ALERIFICALNEUMORAITI is not online. ALERIFICALNEUMORAITI
Joined: 21 Nov 2010
Total Posts: 302
30 May 2013 07:30 PM
>> math.Random(1,4)

math.random(1,4)

caps are a b
Report Abuse
Desperian is not online. Desperian
Joined: 07 Feb 2012
Total Posts: 3371
30 May 2013 07:31 PM
1) With your 'e' variable it'll just become the value indicated when the script first runs, and will not change from that even if the value is changed.
2) You've not defined 'a' anywhere.
3) You should store the data in the relevant value type. So, for a number, you should use a 'NumberValue'. It makes more logical sense.
4) What Ale said.
Report Abuse
CORGovernor is not online. CORGovernor
Joined: 12 Mar 2013
Total Posts: 45
30 May 2013 07:35 PM
I didn't list all the "whatever = this"'s yet btw.

Report Abuse
CORGovernor is not online. CORGovernor
Joined: 12 Mar 2013
Total Posts: 45
30 May 2013 07:44 PM
e = script.Parent.Value
a = script.Parent.Parent.Parent:findFirstChild("Adrianople").Torso.AIPlace.Value

while true do
wait()
d = math.random(1,4)
e.Value = d
if e.Parent.Parent.BrickColor == a.Parent.Parent.BrickColor then
end
if not e.Parent.Parent.BrickColor == a.Parent.Parent.BrickColor then
if e > a then
print("Testing started!") -- Just to check if the script works properly
b = e - a -- OHIADER
e.Value = b
a.Parent.Parent.BrickColor = Color3.new("e.Parent.Parent.BrickColor")
print("Testing ended!") -- Just to check if the script works properly
wait(10)
end
end
end)

--[[

The line next to OHIADER is suppose to subtract e and a's Number Values, then change e's Value to b, which is the answer from the subtraction (I doubt i did it right).

It's also checking if the BrickColor is the same or not, and if it is, it does not continue with the process but should rather end until next turn.

This is a small bit for a Territory Conquest, only its AI's against AI's.
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