Code is :
Instance.new("TextLabel", script.Parent) print("Text Made") TextLabel.name = text text.Text = ("426emosewaeht yb edam tpirs txet"):reverse()
Error : Players.Player1.PlayerGui.ScreenGui.Script:3: attempt to index global 'TextLabel' (a nil value) Whats wrong here?
Your problem is that you never set a variable! so it's nil because it doesn't know what it's looking for! So try this!!
label = Instance.new("TextLabel", script.Parent)--label is now the variable. print("Text Made") label.name = text--replaced "textlabel" with label as it was not defined. text.Text = ("426emosewaeht yb edam tpirs txet"):reverse()
Hope this helped!!
I suggest using Variable to prevent this sort of stuff from Happening.
local Label = Instance.new("TextLabel", script.Parent) print("Text Made") Label.TextLabel.name = text Label.Text = ("426emosewaeht yb edam tpirs txet"):reverse()