Half script plays, the other half doesn't for one part of the script but it does for the other?
Asked by
8 years ago Edited 8 years ago
Ok, so The Top part of the Script where it says "Away" the gui shows that, but it doesn't complete the whole script. It just says that and the script breaks. Under that, the "Home" Part if that is true then it plays the whole script, I don't know how to get the "Away" part to complete the entire script like "Home" part does.
02 | plr = game.Players.LocalPlayer |
03 | char = plr.CharacterAdded:wait() |
05 | wait(math.random( 0 , 10 )/ 10 ) |
06 | if d and char:WaitForChild( "Humanoid" ).Jump and workspace:findFirstChild(plr.Court.Value)._Values.playing.Value = = true and char:FindFirstChild( "_Ball1" ) then |
09 | if char:FindFirstChild( "_Ball1" ) then |
10 | workspace:findFirstChild(plr.Court.Value)._Shotclock.Timer.whistle:Play() |
11 | if workspace:findFirstChild(plr.Court.Value)._Values.team.Value = = "Away" then |
12 | workspace:findFirstChild(plr.Court.Value)._Values.foul.Value = |
15 | workspace:findFirstChild(plr.Court.Value)._Values.foul.Value = "" |
18 | if workspace:findFirstChild(plr.Court.Value)._Values.team.Value = = "Home" then |
19 | workspace:findFirstChild(plr.Court.Value)._Values.foul.Value = |
22 | workspace:findFirstChild(plr.Court.Value)._Values.foul.Value = "" |
24 | workspace:findFirstChild(plr.Court.Value)._Values.removal.Value = true |
26 | local c = game.Players:children() |
28 | if c [ i ] ._Team.Value = = "Away" then |
29 | c [ i ] .Character.Torso.CFrame = CFrame.new(workspace:findFirstChild(plr.Court.Value)._Positions.awaytp.Position) |
30 | elseif c [ i ] ._Team.Value = = "Home" then |
31 | c [ i ] .Character.Torso.CFrame = CFrame.new(workspace:findFirstChild(plr.Court.Value)._Positions.hometp.Position) |
34 | if workspace:findFirstChild(plr.Court.Value)._Values.team.Value = = "Away" then |
35 | local ball = game.Lighting._Ball 1 :Clone() |
38 | ball.Handle.Position = workspace:findFirstChild(plr.Court.Value)._Positions.homeball.Position |
39 | elseif workspace:findFirstChild(plr.Court.Value)._Values.team.Value = = "Home" then |
40 | local ball = game.Lighting._Ball 1 :Clone() |
43 | ball.Handle.Position = workspace:findFirstChild(plr.Court.Value)._Positions.awayball.Position |
I Figured out the problem is in this:
2 | if workspace:findFirstChild(plr.Court.Value)._Values.team.Value = = "Home" then |
3 | workspace:findFirstChild(plr.Court.Value)._Values.foul.Value = |
6 | workspace:findFirstChild(plr.Court.Value)._Values.foul.Value = |