Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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?

7 comments

0

What is f?

0

F is the player, can you try fixing it now please?

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.

0

Is it erroring? If it is, that's why it isn't continuing.

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

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)

0

I thought that. But in order to help we would need Output and probably the entire script

1 answer

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?

2 comments

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.

0

You can't post scripts in comments.

This discussion is preserved as it was. New answers, comments, and votes are closed.