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

Script broken, will not move on after if-check. How to fix?

Asked by 10 years ago
wait(15)
if f.Backpack.GameState.Value == 1 then 
Game.Lighting.BeginnerSword:Clone().Parent = f.Backpack wait(0.1)
f.Backpack.GameState:Destroy()
end
wait(.1)
H = Instance.new("Hint")
H.Parent = game.Workspace
time = 122
Game_Launch_Part_Three()
end)()
t = t + 1 if t > #spawns then t = 1 
end
end
wait(.1)
end

Basically it will not keep on moving after the if check and it will stop at the if-check. How do I keep the script moving. I mean simply, if the script cannot find that GameState.Value == 1 in a player's backpack then it will simply move on. But it is not doing that. Why?

0
What is f? Tempestatem 884 — 10y
0
F is the player, can you try fixing it now please? Overpride 0 — 10y
0
I'm not helping you after that rude comment. If you want people to help, I suggest being nice. All I will say is that it doesn't know what f is. Tempestatem 884 — 10y
0
Is it erroring? If it is, that's why it isn't continuing. Thewsomeguy 448 — 10y
View all comments (3 more)
0
^ It doesnt know what f is, from the looks of this script. @Overpride  if you want people to help, I would suggest telling us what output says so we can help you to the best of our ability Tempestatem 884 — 10y
0
I don't think this is the full script. He's also trying to call Game_Launch_Part_Three. And, there's an end)() in the middle of the script (not sure about the () after the end) Thewsomeguy 448 — 10y
0
I thought that. But in order to help we would need Output and probably the entire script Tempestatem 884 — 10y

1 answer

Log in to vote
-1
Answered by 10 years ago
19:36:14.440 - GameState is not a valid member of Backpack
19:36:14.441 - Script 'Workspace.OvEngine(Game Script)', Line 108
19:36:14.442 - Stack End

That is the output.

if f.Backpack.GameState.Value == 1 then  ----Line 108
Game.Lighting.BeginnerSword:Clone().Parent = f.Backpack wait(0.1)
f.Backpack.GameState:Destroy()
end
H = Instance.new("Hint")
H.Parent = game.Workspace
time = 122
Game_Launch_Part_Three()
end)()
t = t + 1 if t > #spawns then t = 1 
end
end
wait(.1)
end

F is basically this:

for k, f in pairs(Game.Players:GetPlayers()) do coroutine.wrap(function() 
local blcks = spawns[t]
GameState = Instance.new("IntValue")
GameState.Parent = f.Backpack
GameState.Name = "GameState"
f.Backpack.GameState.Value = 1
f.Character.Torso.CFrame = CFrame.new(Vector3.new(blcks.Position.x,blcks.Position.y+3,blcks.Position.z))
f.Character.Humanoid.WalkSpeed = 0 

There, can you tell me what the problem is now?

0
Do not use the answers section as a means to respond to comments. Ever. Answers section is for answers and answers only. Comments belong in the comments section. User#2 0 — 10y
0
You can't post scripts in comments. Overpride 0 — 10y
Ad

Answer this question