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

[SOLVED] My TextButton's aren't showing up and the TextLabel is broken?

For some reason my "Next" and "Previous" buttons aren't being created at all, and the TextLabel is just saying "Label" and has the wrong TextSize.

pagenumberlbl = Instance.new("TextLabel")
pagenumberlbl.Name = "PageNumber"
pagenumberlbl.Parent = mframe
pagenumberlbl.BorderColor3 = Color3.new(0, 0, 0)
pagenumberlbl.Size = UDim2.new(0.75, 0, 0.05, 0)
pagenumberlbl.Font = Enum.Font.SourceSans
pagenumber = 1
pagenumberlbl.Text = "Page " + tostring(pagenumber)
pagenumberlbl.TextSize = 24

pagenext = Instance.new("TextButton")
pagenext.Name = "Next"
pagenext.Parent = mframe
pagenext.BackgroundColor3 = Color3.new(0, 255, 0)
pagenext.BorderColor3 = Color3.new(0, 0, 0)
pagenext.Position = UDim2.new(0.85, 0, 0, 0)
pagenext.Size = UDim2.new(0.1, 0, 0.05, 0)
pagenext.Font = Enum.Font.SourceSans
pagenext.Text = "Next"
pagenext.TextSize = 24

pageprevious = Instance.new("TextButton")
pageprevious.Name = "Previous"
pageprevious.Parent = mframe
pageprevious.BackgroundColor3 = Color3.new(255, 255, 0)
pageprevious.BorderColor3 = Color3.new(0, 0, 0)
pageprevious.Position = UDim2.new(0.95, 0, 0, 0)
pageprevious.Size = UDim2.new(0.1, 0, 0.05, 0)
pageprevious.Font = Enum.Font.SourceSans
pageprevious.Text = "Previous"
pageprevious.TextSize = 24

9 comments

0

It is a LocalScript by the way.

0

I think you should make the GUI then use the GUI To LUA plugin to convert it into this.

0

line 8 , if youre trying to concatonate, use '..' not a '+'

0

line 8 , if youre trying to concatenate, use '..' not a '+'

0

line 8 , if youre trying to concatenate, use '..' not a '+'

0

line 8 , if youre trying to concatenate, use '..' not a '+'

0

line 8 , if youre trying to concatenate, use '..' not a '+'

0

line 8 , if youre trying to concatenate, use '..' not a '+'

0

line 8 , if youre trying to concatenate, use '..' not a '+'

2 answers

The reason it is not defining the Text is because you have it setting pagenumber to 1.. Perhaps pagenumber is undefined. Try putting local in front of that to see if it helps.

If this helped, mark it correct and upvote! Thanks!

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