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: If script ruins the entire script?

Previous Thread :: Next Thread 
Distortional is not online. Distortional
Joined: 22 Nov 2011
Total Posts: 6530
23 Aug 2014 07:52 PM
If I do it works:
plr = script.Parent.Parent.Parent.Parent.Parent
script.Parent.MouseButton1Click:connect(function()
local team = plr.TeamColor
local timer = script.Parent.Parent.Timer
local value = script.Parent.Parent.Value
print("Captured by raiders")
script.Parent.Parent.Owner.Value = BrickColor.new("Bright red")
RaiderOwn()
end)

function RaiderOwn()
repeat
script.Parent.Parent.Value.Value = script.Parent.Parent.Value.Value+1
until script.Parent.Parent.Value.Value >= 1200 or script.Parent.Parent.Owner == "Bright blue"
end




If I do this, it doesn't:
plr = script.Parent.Parent.Parent.Parent.Parent
script.Parent.MouseButton1Click:connect(function()
local team = plr.TeamColor
local timer = script.Parent.Parent.Timer
local value = script.Parent.Parent.Value
if plr.TeamColor == "Bright red" then
print("Captured by raiders")
script.Parent.Parent.Owner.Value = BrickColor.new("Bright red")
RaiderOwn()
end
end)

function RaiderOwn()
repeat
script.Parent.Parent.Value.Value = script.Parent.Parent.Value.Value+1
until script.Parent.Parent.Value.Value >= 1200 or script.Parent.Parent.Owner == "Bright blue"
end





If you look closely, I don't give a crap.
Report Abuse
Distortional is not online. Distortional
Joined: 22 Nov 2011
Total Posts: 6530
23 Aug 2014 08:01 PM
bump

If you look closely, I don't give a crap.
Report Abuse
Distortional is not online. Distortional
Joined: 22 Nov 2011
Total Posts: 6530
23 Aug 2014 08:04 PM
...
This I don't like this forum. I help others, then when I need help, no one gives a squat.

If you look closely, I don't give a crap.
Report Abuse
Accomplishable is not online. Accomplishable
Joined: 13 Aug 2009
Total Posts: 6207
23 Aug 2014 08:04 PM
I have the same problem as u do with this forum
Report Abuse
Distortional is not online. Distortional
Joined: 22 Nov 2011
Total Posts: 6530
23 Aug 2014 08:08 PM
^

If you look closely, I don't give a crap.
Report Abuse
TheBenSquare is not online. TheBenSquare
Joined: 13 Dec 2009
Total Posts: 13604
23 Aug 2014 08:09 PM
What is the difference between the scripts?
Report Abuse
Distortional is not online. Distortional
Joined: 22 Nov 2011
Total Posts: 6530
23 Aug 2014 08:10 PM
Line six in the second has an if

If you look closely, I don't give a crap.
Report Abuse
TheBenSquare is not online. TheBenSquare
Joined: 13 Dec 2009
Total Posts: 13604
23 Aug 2014 08:12 PM
Hmmph, I don't see why it would crash either way.
Report Abuse
Distortional is not online. Distortional
Joined: 22 Nov 2011
Total Posts: 6530
23 Aug 2014 08:15 PM
When did I say it crashed...? It just doesn't work.

If you look closely, I don't give a crap.
Report Abuse
Bobobob12 is not online. Bobobob12
Joined: 23 Jan 2008
Total Posts: 5350
23 Aug 2014 08:17 PM
plr.TeamColor == BrickColor.new("Bright red")
Report Abuse
Distortional is not online. Distortional
Joined: 22 Nov 2011
Total Posts: 6530
23 Aug 2014 08:20 PM
Thanks bob.

If you look closely, I don't give a crap.
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