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
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!