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: would this work?

Previous Thread :: Next Thread 
islandmaker2012 is not online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
27 Dec 2013 08:53 PM
I can't test it right now..I'm ok n the phone..but anyways..

In the starter pack
A localscript

Player = script.Parent.Parent
while wait (0.1) do
Bluekos = Workspace.bkos.Value
Redkos = Workspace.rkos.Value
Bluewos = Workspace.bwos.Value
Redwos = Workspace.rwos.Value
if Player.Character. Humanoid.Health < 1 then
if Player.Character. Torso.BrickColor == BrickColor.new ("Really blue") then
Bluewos = Bluewos +1
Redkos = Redkos +1
elseif Player.Character. Torso. BrickColor == BrickColor.new ("Really red")
Bluekos = Bluekos +1
Redkos = Redkos +1
end
end
end
Report Abuse
ozzzyt is not online. ozzzyt
Joined: 08 Jan 2013
Total Posts: 3576
27 Dec 2013 08:56 PM
I think so.
Report Abuse
islandmaker2012 is not online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
27 Dec 2013 08:57 PM
Thx, that's all I wanted to hear :P
Report Abuse
ozzzyt is not online. ozzzyt
Joined: 08 Jan 2013
Total Posts: 3576
27 Dec 2013 08:59 PM
Not 100% sure.
Report Abuse
wazap is not online. wazap
Joined: 29 Jun 2007
Total Posts: 23234
27 Dec 2013 09:08 PM
No it wouldnt. Missing 'then' after elseif

Also

Player = game.Players.LocalPlayer --less error prone

Additionally
Bluekos = Workspace.bkos
Redkos = workspace.rkos
Bluewos = workspace.bwos
Redwos = workspace.rwos

Its smarter to always reference just the object, dont go on and use .Value
I'll explain why

Bluekos = Bluekos + 1
What will this do? It wouldnt set Workspace.bkos.Value, say, its 2. It wouldnt make it 3. It'll just stay at 2. Reason being Bluekos is now just a variable that stores an integer. It wont reference the object ever again. confusing? I know.

But anyways, so here is what you do

Redefine all your stuff as mentioned above
Then use

Bluekos.Value = Bluekos.Value + 1
And so forth
Although I'm not 100% confident this will work eitehr, considering its a LocalScript.
Report Abuse
islandmaker2012 is not online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
27 Dec 2013 09:28 PM
I have used this sort of thing b4 as a local script I the starterpAck andbit worked, also thx fro pointingbout I missed 'then' and also the fact about the value, thx
Report Abuse
islandmaker2012 is not online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
27 Dec 2013 09:29 PM
P.s sorry for all the typos..I'm using the phone..
Report Abuse
islandmaker2012 is not online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
27 Dec 2013 09:33 PM
Thread closed..but random BUMP
anyway :P
Report Abuse
islandmaker2012 is not online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
27 Dec 2013 11:32 PM
Player = script.Parent.Parent
while wait (0.1) do
Bluekos = Workspace.bkos
Redkos = Workspace.rkos
Bluewos = Workspace.bwos
Redwos = Workspace.rwos
if Player.Character. Humanoid.Health < 1 then
if Player.Character. Torso.BrickColor == BrickColor.new ("Really blue") then
Bluewos.Value = Bluewos.Value +1
Redkos.Value = Redkos.Value +1
elseif Player.Character. Torso. BrickColor == BrickColor.new ("Really red") then
Bluekos.Value = Bluekos.Value +1
Redkos.Value = Redkos.Value +1
end
end
end
This is what I got noq..should qork..ill test it 2morrow
Report Abuse
islandmaker2012 is not online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
27 Dec 2013 11:49 PM
Now*
Work*
Typos..
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