Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 5 years ago
Edited 5 years ago

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
0
It is a LocalScript by the way. Crvnberie 35 — 5y
0
I think you should make the GUI then use the GUI To LUA plugin to convert it into this. StrategicPlayZ 58 — 5y
0
line 8 , if youre trying to concatonate, use '..' not a '+' tonyv537 95 — 5y
0
line 8 , if youre trying to concatenate, use '..' not a '+' tonyv537 95 — 5y
View all comments (5 more)
0
line 8 , if youre trying to concatenate, use '..' not a '+' tonyv537 95 — 5y
0
line 8 , if youre trying to concatenate, use '..' not a '+' tonyv537 95 — 5y
0
line 8 , if youre trying to concatenate, use '..' not a '+' tonyv537 95 — 5y
0
line 8 , if youre trying to concatenate, use '..' not a '+' tonyv537 95 — 5y
0
line 8 , if youre trying to concatenate, use '..' not a '+' tonyv537 95 — 5y

2 answers

Log in to vote
0
Answered by 5 years ago
Edited 5 years ago

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!

Ad
Log in to vote
0
Answered by 5 years ago

You use .. to concatenate instead of +.

Answer this question