I think I made it too long...
if b == 1 then
player.Character.Humanoid.WalkSpeed = 0
player.Character.Humanoid.JumpPower = 0
player.PlayerScripts.CameraScript.Disabled = true
player.PlayerGui.BattleIntro.enco.Playing = true
wait(1)
player.PlayerGui.BattleIntro.BattleMusic.Playing = true
player.PlayerGui.BattleIntro.Frame1:TweenPosition(UDim2.new(0, 0, 0, 0), 'Out', 'Bounce', 1)
wait(0.1)
player.PlayerGui.BattleIntro.Frame2:TweenPosition(UDim2.new(0, 0, 0.1, 0), 'Out', 'Bounce', 1)
wait(0.1)
player.PlayerGui.BattleIntro.Frame3:TweenPosition(UDim2.new(0, 0, 0.2, 0), 'Out', 'Bounce', 1)
wait(0.1)
player.PlayerGui.BattleIntro.Frame4:TweenPosition(UDim2.new(0, 0, 0.3, 0), 'Out', 'Bounce', 1)
wait(0.1)
player.PlayerGui.BattleIntro.Frame5:TweenPosition(UDim2.new(0, 0, 0.4, 0), 'Out', 'Bounce', 1)
wait(0.1)
player.PlayerGui.BattleIntro.Frame6:TweenPosition(UDim2.new(0, 0, 0.5, 0), 'Out', 'Bounce', 1)
wait(0.1)
player.PlayerGui.BattleIntro.Frame7:TweenPosition(UDim2.new(0, 0, 0.6, 0), 'Out', 'Bounce', 1)
wait(0.1)
player.PlayerGui.BattleIntro.Frame8:TweenPosition(UDim2.new(0, 0, 0.7, 0), 'Out', 'Bounce', 1)
wait(0.1)
player.PlayerGui.BattleIntro.Frame9:TweenPosition(UDim2.new(0, 0, 0.8, 0), 'Out', 'Bounce', 1)
wait(0.1)
player.PlayerGui.BattleIntro.Frame10:TweenPosition(UDim2.new(0, 0, 0.9, 0), 'Out', 'Bounce', 1)
wait(1)
player.PlayerGui.Pokemon.Togepi.Visible = true
player.PlayerGui.Pokemon.Axew.Visible = true
player.PlayerGui.Pokemon.Frame:TweenPosition(UDim2.new(0, 0, 0, 0), 'Out', 'Bounce', 1)
player.PlayerGui.BattleIntro.Frame1:TweenPosition(UDim2.new(0, 0, -1, 0), 'Out', 'Bounce', 1)
player.PlayerGui.BattleIntro.Frame2:TweenPosition(UDim2.new(0, 0, -1, 0), 'Out', 'Bounce', 1)
player.PlayerGui.BattleIntro.Frame3:TweenPosition(UDim2.new(0, 0, -1, 0), 'Out', 'Bounce', 1)
player.PlayerGui.BattleIntro.Frame4:TweenPosition(UDim2.new(0, 0, -1, 0), 'Out', 'Bounce', 1)
player.PlayerGui.BattleIntro.Frame5:TweenPosition(UDim2.new(0, 0, -1, 0), 'Out', 'Bounce', 1)
player.PlayerGui.BattleIntro.Frame6:TweenPosition(UDim2.new(0, 0, -1, 0), 'Out', 'Bounce', 1)
player.PlayerGui.BattleIntro.Frame7:TweenPosition(UDim2.new(0, 0, -1, 0), 'Out', 'Bounce', 1)
player.PlayerGui.BattleIntro.Frame8:TweenPosition(UDim2.new(0, 0, -1, 0), 'Out', 'Bounce', 1)
player.PlayerGui.BattleIntro.Frame9:TweenPosition(UDim2.new(0, 0, -1, 0), 'Out', 'Bounce', 1)
player.PlayerGui.BattleIntro.Frame10:TweenPosition(UDim2.new(0, 0, -1, 0), 'Out', 'Bounce', 1)
player.PlayerGui.Pokemon.Battle1.ImageTransparency = 0
wait(0.5)
player.PlayerGui.Pokemon.Battle1:TweenPosition(UDim2.new(0, 0,0.212, 0), 'Out', 'Quad', 1)
player.PlayerGui.Pokemon.Togepi:TweenPosition(UDim2.new(0.631, 0,0.363, 0), 'Out', 'Quad', 1)
player.PlayerGui.Pokemon.TextLabel:TweenPosition(UDim2.new(0, 0, 0.85, 0), 'In', 'Linear', 1)
wait(1)
-- script.Disabled = true
-- script.Parent.Bag.Active = false
-- script.Parent.Switch.Active = false
-- script.Parent.Run.Script4.Disabled = true
player.PlayerGui.Pokemon.TextLabel.Text = (' ')
wait(0.01)
player.PlayerGui.Pokemon.TextLabel.Text = ('A')
wait(0.01)
player.PlayerGui.Pokemon.TextLabel.Text = ('A Togepi')
wait(0.01)
player.PlayerGui.Pokemon.TextLabel.Text = ('A Togepi appeared')
wait(0.01)
player.PlayerGui.Pokemon.TextLabel.Text = ('A Togepi appeared!')
wait(1)
player.PlayerGui.Pokemon.TextLabel.Text = ('A Togepi appeared')
wait(0.01)
player.PlayerGui.Pokemon.TextLabel.Text = ('A Togepi')
wait(0.01)
player.PlayerGui.Pokemon.TextLabel.Text = ('A')
wait(0.01)
player.PlayerGui.Pokemon.TextLabel.Text = (' ')
wait(1)
player.PlayerGui.Pokemon.TextLabel.Text = ('You')
wait(0.01)
player.PlayerGui.Pokemon.TextLabel.Text = ('You threw')
wait(0.01)
player.PlayerGui.Pokemon.TextLabel.Text = ('You threw out')
wait(0.01)
player.PlayerGui.Pokemon.TextLabel.Text = ('You threw out your')
wait(0.01)
player.PlayerGui.Pokemon.TextLabel.Text = ('You threw out your Pokemon')
wait(0.01)
player.PlayerGui.Pokemon.TextLabel.Text = ('You threw out your Pokemon!')
wait(1)
player.PlayerGui.Pokemon.TextLabel.Text = ('You threw out your Pokemon')
wait(0.01)
player.PlayerGui.Pokemon.TextLabel.Text = ('You threw out your')
wait(0.01)
player.PlayerGui.Pokemon.TextLabel.Text = ('You threw out')
wait(0.01)
player.PlayerGui.Pokemon.TextLabel.Text = ('You threw')
wait(0.01)
player.PlayerGui.Pokemon.TextLabel.Text = ('You')
wait(0.01)
player.PlayerGui.Pokemon.TextLabel.Text = (' ')
wait(1)
player.PlayerGui.Pokemon.TextLabel.Text = ('What')
wait(0.01)
player.PlayerGui.Pokemon.TextLabel.Text = ('What do')
wait(0.01)
player.PlayerGui.Pokemon.TextLabel.Text = ('What do you')
wait(0.01)
player.PlayerGui.Pokemon.TextLabel.Text = ('What do you do')
wait(0.01)
player.PlayerGui.Pokemon.TextLabel.Text = ('What do you do next')
wait(0.01)
player.PlayerGui.Pokemon.TextLabel.Text = ('What do you do next?')
player.PlayerGui.Pokemon.Fight:TweenPosition(UDim2.new(0, 0, 0.7, 0), 'Out', 'Back', 1)
wait(0.2)
player.PlayerGui.Pokemon.Bag:TweenPosition(UDim2.new(0.25, 0, 0.7, 0), 'Out', 'Back', 1)
wait(0.2)
player.PlayerGui.Pokemon.Switch:TweenPosition(UDim2.new(0.5, 0, 0.7, 0), 'Out', 'Back', 1)
wait(0.2)
player.PlayerGui.Pokemon.Run:TweenPosition(UDim2.new(0.75, 0, 0.7, 0), 'Out', 'Back', 1)
end
end
end
end
end
end)
(this is the Pokemon RNG system I've been working on. That's just one pokemon, and I made three.)

7 comments
Could you omitt all code besides the area of focus?
That section is what has been repeating throughout the code.
Is there an error? No one is going to sort through a hundred lines of code on a bug hunt for you with no place to look.
Heres the problem, it just stops working. No errors , nothing
Whenever i go over 'b == 2', that part of the script doesn't render. It just prints that of which I tell it to.
(It's not a 'works only in studio' problem either.)
Well, I've been working at it, and it seems to be a script bug of some sort. It works a bit now.