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: [SH CHALLENGE] Spot the Error(s)! *PRIZE*

Previous Thread :: Next Thread 
devTools is online. devTools
Joined: 06 Sep 2014
Total Posts: 7950
29 Dec 2014 10:03 PM
PRIZE:
250 Robux (Post a t-shirt link with your 'fixed' script)

INFO:
-There is a model in workspace named "Vals" and it has all of the BoolValues inside of it.
The names of the BoolValues are:
SOcapturing
SOcaptured
SOwin
RaiderCapturing
RaiderCaptured
RaiderWin

This LocalScript is in a TextLabel in StarterGui

WHAT IT IS:
This will be used for a terminal that war clans would use. It will countdown 15 seconds when it is being captured by either team and will restart at 0 if the other team starts to capture it while the other team is capturing it. Once captured, it will count from 0 to 1200 or until the terminal is recaptured by the other team. The terminal is captured when they click the button on it with a script inside it. Both the LocalScript and the script are below.

ISSUES:
The .Changed events will not fire, therefore making the countdown not work.

REQUIREMENTS TO WIN:
The script must work and you must have BC to be rewarded.

SCRIPT INSIDE THE BUTTON (Works):
script.Parent.ClickDetector.MouseClick:connect(function(playerWhoClicked)
a = game.Players[playerWhoClicked.Name]
if a.TeamColor == BrickColor.new("Pastel Blue") or a.TeamColor == BrickColor.new("Bright green") then
game.Workspace.Vals.SOcapturing.Value = true
print("SOcapturing = true")
game.Workspace.Vals.RaiderCapturing.Value = false
print("RaiderCapturing = false")
elseif a.TeamColor == BrickColor.new("Bright yellow") then
game.Workspace.Vals.RaiderCapturing.Value = true
print("RaiderCapturing = true")
game.Workspace.Vals.SOcapturing.Value = false
print("SOcapturing = false")
else
end

end)

------------------------------------------------------------

LOCALSCRIPT INSIDE THE TEXTLABEL:

a = game.Workspace.Vals

a.SOcapturing.Changed:wait():connect(function()
if a.SOcapturing.Value == true then
print("SOcapturing = true")
timer = 15
repeat
wait(1)
timer = timer - 1
script.Parent.Text = "Time Until Capture: "..tostring(timer)
until
timer == 0 or a.RaiderCapturing.Value == true or a.SOcapturing.Value == false
a.SOcapturing.Value = false
a.SOcaptured.Value = true
a.RaiderCapturing.Value = false
a.RaiderCaptured.Value = false
end
end)

a.RaiderCapturing.Changed:connect(function()
if a.RaiderCapturing.Value == true then
print("RaiderCapturing = true")
timer2 = 15
repeat
wait(1)
timer2 = timer2 - 1
script.Parent.Text = "Time Until Capture: "..tostring(timer)
until
timer2 == 0 or a.RaiderCapturing.Value == false or a.SOcapturing.Value == true
a.RaiderCapturing.Value = false
a.RaiderCaptured.Value = true
a.SOcapturing.Value = false
a.SOcaptured.Value = false
end
end)

a.SOcaptured.Changed:connect(function()
if a.SOcaptured.Value == true then
print("SOcaptured = true")
timer3 = 0
repeat
wait(1)
timer3 = timer3 + 1
script.Parent.Text = "Capture Time: "..tostring(timer3)
until
timer3 == 1200 or a.SOcaptured.Value == false or a.RaiderCapturing.Value == true

if timer3 == 1200 then
a.SOwin.Value = true
a.RaiderWin.Value = false
a.SOcapturing.Value = false
a.SOcaptured.Value = false
a.RaiderCapturing.Value = false
a.RaiderCaptured.Value = false
game.Workspace.Terminal.captured.beam.Transparency = .5
end
else
end
end)

a.RaiderCaptured.Changed:connect(function()
if a.RaiderCaptured.Value == true then
print("RaiderCaptured = true")
timer4 = 0
repeat
wait(1)
timer4 = timer4 + 1
script.Parent.Text = "Capture Time: "..tostring(timer4)
until
timer4 == 1200 or a.SOcapturing.Value == true or a.RaiderCaptured.Value == false

if timer4 == 1200 then
a.RaiderWin.Value = true
a.SOwin.Value = false
a.SOcapturing.Value = false
a.SOcaptured.Value = false
a.RaiderCapturing.Value = false
a.RaiderCaptured.Value = false
game.Workspace.Terminal.captured.beam.Transparency = .5
end
else
end
end)

---------------------------------------------------------------------------

The first poster to have a working script will be awarded 250 robux as listed above. I would do 500 robux, but I only have 257 robux, sorry.

Thank you for the help and good luck!


|| devTools | get out me mooms car | broom broom ||
Report Abuse
devTools is online. devTools
Joined: 06 Sep 2014
Total Posts: 7950
29 Dec 2014 10:09 PM
Bump
I figured that since I only had 257 robux and I already wrote some of the script (Just broken a bit I think), a 250 robux reward would be good.

Also, please don't mention the irony about "devTools" asking for "dev" help because I am only an intermediate scripter (Maybe less than that), but I am a very good builder (If I say so myself).

Thanks again everyone and I am excited to get this working!

PS: I am making this for my friend's war clan.



|| devTools | get out me mooms car | broom broom ||
Report Abuse
devTools is online. devTools
Joined: 06 Sep 2014
Total Posts: 7950
29 Dec 2014 10:13 PM
Anyone up for the challenge? I am sure there are some advanced scripters out there that can find the errors and fix them in minutes. Help?

Where's cnt or 128GB when I need them... qq


|| devTools | get out me mooms car | broom broom ||
Report Abuse
Moxiii is not online. Moxiii
Joined: 06 Mar 2012
Total Posts: 1198
29 Dec 2014 10:20 PM
just did a quick read

a.SOcapturing.Changed:wait():connect(function()
should be
a.SOcapturing.Changed:connect(function()
no?

apologies if this isn't helpful.
Report Abuse
devTools is online. devTools
Joined: 06 Sep 2014
Total Posts: 7950
29 Dec 2014 11:41 PM
I don't think that's the issue but I'll change it and see. Thanks for the input!


|| devTools | get out me mooms car | broom broom ||
Report Abuse
masterblokz is not online. masterblokz
Joined: 17 Nov 2010
Total Posts: 9517
29 Dec 2014 11:43 PM
can you tell us what line it errors on o_O?
Report Abuse
devTools is online. devTools
Joined: 06 Sep 2014
Total Posts: 7950
29 Dec 2014 11:49 PM
No output errors.


|| devTools | get out me mooms car | broom broom ||
Report Abuse
anaIyze is not online. anaIyze
Joined: 29 May 2014
Total Posts: 2048
29 Dec 2014 11:50 PM
Lol I ain't fixing this for a lousy 250R$ you dumbass skid
Report Abuse
masterblokz is not online. masterblokz
Joined: 17 Nov 2010
Total Posts: 9517
29 Dec 2014 11:54 PM
Then I suggest adding prints and see where it stops.
Report Abuse
devTools is online. devTools
Joined: 06 Sep 2014
Total Posts: 7950
29 Dec 2014 11:54 PM
Look, I just have 257 robux and I already have a partially working script. I am paying 250 robux for someone to read it and just fix the little errors.


|| devTools | get out me mooms car | broom broom ||
Report Abuse
devTools is online. devTools
Joined: 06 Sep 2014
Total Posts: 7950
29 Dec 2014 11:55 PM
@Master
I already know where it stops but I don't know why. It stops at the .Changed event each time I try it. qq


|| devTools | get out me mooms car | broom broom ||
Report Abuse
masterblokz is not online. masterblokz
Joined: 17 Nov 2010
Total Posts: 9517
29 Dec 2014 11:59 PM
So which changed are we talking about? The very top one? If so, does it not print "SOcapturing = true"??
Report Abuse
joelsdarkside22 is not online. joelsdarkside22
Joined: 18 Mar 2009
Total Posts: 1131
30 Dec 2014 12:05 AM
'a = game.Players[playerWhoClicked.Name]'
why, just, why
Report Abuse
devTools is online. devTools
Joined: 06 Sep 2014
Total Posts: 7950
30 Dec 2014 12:07 AM
That line works, the game.Players[PlayerWhoClicked.Name]


|| devTools | get out me mooms car | broom broom ||
Report Abuse
joelsdarkside22 is not online. joelsdarkside22
Joined: 18 Mar 2009
Total Posts: 1131
30 Dec 2014 12:10 AM
you are dumb
Report Abuse
BamRulez is not online. BamRulez
Joined: 18 Sep 2010
Total Posts: 239
30 Dec 2014 12:12 AM
PlayerWhoClicked.Name?
Try,

(functionName).Character.Name -- Begginer at scripting, so this probably won't work.
Report Abuse
joelsdarkside22 is not online. joelsdarkside22
Joined: 18 Mar 2009
Total Posts: 1131
30 Dec 2014 12:13 AM
@Bam
That would work but you do not comprehend what I mean.
Report Abuse
masterblokz is not online. masterblokz
Joined: 17 Nov 2010
Total Posts: 9517
30 Dec 2014 12:16 AM
wait()
a = game.Workspace.Vals

a.SOcapturing.Changed:wait():connect(function()
if a.SOcapturing.Value == true then
print("SOcapturing = true")
timer = 15
repeat
wait(1)
timer = timer - 1
script.Parent.Text = "Time Until Capture: "..tostring(timer)
until
timer == 0 or a.RaiderCapturing.Value == true or a.SOcapturing.Value == false
a.SOcapturing.Value = false
a.SOcaptured.Value = true
a.RaiderCapturing.Value = false
a.RaiderCaptured.Value = false
end
end)

a.RaiderCapturing.Changed:connect(function()
if a.RaiderCapturing.Value == true then
print("RaiderCapturing = true")
timer2 = 15
repeat
wait(1)
timer2 = timer2 - 1
script.Parent.Text = "Time Until Capture: "..tostring(timer)
until
timer2 == 0 or a.RaiderCapturing.Value == false or a.SOcapturing.Value == true
a.RaiderCapturing.Value = false
a.RaiderCaptured.Value = true
a.SOcapturing.Value = false
a.SOcaptured.Value = false
end
end)

a.SOcaptured.Changed:connect(function()
if a.SOcaptured.Value == true then
print("SOcaptured = true")
timer3 = 0
repeat
wait(1)
timer3 = timer3 + 1
script.Parent.Text = "Capture Time: "..tostring(timer3)
until
timer3 == 1200 or a.SOcaptured.Value == false or a.RaiderCapturing.Value == true

if timer3 == 1200 then
a.SOwin.Value = true
a.RaiderWin.Value = false
a.SOcapturing.Value = false
a.SOcaptured.Value = false
a.RaiderCapturing.Value = false
a.RaiderCaptured.Value = false
game.Workspace.Terminal.captured.beam.Transparency = .5
end
else
end
end)

a.RaiderCaptured.Changed:connect(function()
if a.RaiderCaptured.Value == true then
print("RaiderCaptured = true")
timer4 = 0
repeat
wait(1)
timer4 = timer4 + 1
script.Parent.Text = "Capture Time: "..tostring(timer4)
until
timer4 == 1200 or a.SOcapturing.Value == true or a.RaiderCaptured.Value == false

if timer4 == 1200 then
a.RaiderWin.Value = true
a.SOwin.Value = false
a.SOcapturing.Value = false
a.SOcaptured.Value = false
a.RaiderCapturing.Value = false
a.RaiderCaptured.Value = false
game.Workspace.Terminal.captured.beam.Transparency = .5
end
else
end
end)


Try this.
Report Abuse
BamRulez is not online. BamRulez
Joined: 18 Sep 2010
Total Posts: 239
30 Dec 2014 12:16 AM
Oh, I don't know what you were trying to make, so yeah.
Report Abuse
devTools is online. devTools
Joined: 06 Sep 2014
Total Posts: 7950
30 Dec 2014 01:25 AM
@Master
Thanks for the attempt, but the issue is that it won't work still. The timer won't change at all and the functions won't fire.

Does anyone know why the .Changed events aren't firing in this LocalScript?


|| devTools | get out me mooms car | broom broom ||
Report Abuse
iiEssence is not online. iiEssence
Joined: 18 Jun 2014
Total Posts: 3467
30 Dec 2014 02:08 AM
were we suppose to be hyped reading the title

cus it worked, until i read the body
Report Abuse
iiEssence is not online. iiEssence
Joined: 18 Jun 2014
Total Posts: 3467
30 Dec 2014 02:17 AM
reading this thread is fun

"a = game.Players[playerWhoClicked.Name]"

imma track for fun
Report Abuse
LegendaryAccount is not online. LegendaryAccount
Joined: 02 Jun 2010
Total Posts: 13193
30 Dec 2014 02:48 AM
if you open source the game that just has this code ill try to fix it for you since im bored
Report Abuse
parkiet3 is not online. parkiet3
Joined: 16 Jul 2011
Total Posts: 832
30 Dec 2014 02:56 AM
Try :

a = game.Players:GetChildren()[playerWhoClicked.Name]
Report Abuse
LegendaryAccount is not online. LegendaryAccount
Joined: 02 Jun 2010
Total Posts: 13193
30 Dec 2014 02:59 AM
lol park you just topped the list
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