Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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.

01d=true
02plr=game.Players.LocalPlayer
03char=plr.CharacterAdded:wait()
04while wait() do
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
07        d=false
08        wait(1)
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 --The Gui shows this and it doesnt complete the entire script
12                workspace:findFirstChild(plr.Court.Value)._Values.foul.Value=
13"Traveling"
14                wait(1.5)
15                workspace:findFirstChild(plr.Court.Value)._Values.foul.Value=""
View all 48 lines...

I Figured out the problem is in this:

1else
2                if workspace:findFirstChild(plr.Court.Value)._Values.team.Value=="Home" then
3                workspace:findFirstChild(plr.Court.Value)._Values.foul.Value=
4"Traveling"
5                wait(1.5)
6                workspace:findFirstChild(plr.Court.Value)._Values.foul.Value=
7""
8                end
9            wait(0.5)
0
Error messages would be helpful chess123mate 5873 — 8y

Answer this question