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

How do I make a "next" button that when you press it it goes to the next part?

script.Parent.MouseButton1Click:Connect(function()
	script.Parent.Parent.TextLabel.Text = "In this game, you are a child, an evil child"
	script.Parent.Parent.ImageLabel.Image = "rbxassetid://4991812792"
	end)
	
	script.Parent.MouseButton1Click:Connect(function()
		script.Parent.Parent.TextLabel.Text = "Your Parents are gone! We can go out to have a backyard battle"
	script.Parent.Parent.ImageLabel.Image = "rbxassetid://4991812792"
	end)
	

Help PLease!

2 comments

0

Nguyenlegiahung has a good answer but

0

you can add some wait(x)

1 answer

You can do this:

local page = 1
script.Parent.MouseButton1Click:Connect(function()
if page == 1 then
	script.Parent.Parent.TextLabel.Text = "In this game, you are a child, an evil child"
	script.Parent.Parent.ImageLabel.Image = "rbxassetid://4991812792"
	page = 2
end
if page == 2 then
	page = 1 -- or 3 depending on you
        script.Parent.Parent.TextLabel.Text = "Your Parents are gone! We can go out to have a backyard battle"
    script.Parent.Parent.ImageLabel.Image = "rbxassetid://4991812792"
	end
end)

1 comment

0

It skips it to the end, when I click the button it goes to page 2 and not page 1.

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