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

Why does this not change the text?

Asked by 6 years ago
script.Parent.Parent.StartFill.MouseButton1Click:connect(function()
    local plr = game.Players.LocalPlayer
    local text1 = script.Parent.PlrName.Name.Text
    local text2 = script.Parent.Age.Text
    local Age = plr.AccountAge
    local Name = plr.Name
    local gui = script.Parent
    text1 = (Name)
    text2 = (Age)
    script.Parent.Parent.StartFill.Visible = false
    script.Parent.Parent.CheckApp.Visible = false
    gui.Visible = true
    gui:TweenSize(UDim2.new(0,822,0,562), "In", "Quint", 1)
end)

I tried this but it didn't work, it is supposed to change a text label in the player's GUI but it seems to not work. Any help would be appreciated!

1 answer

Log in to vote
-1
Answered by 6 years ago
script.Parent.Parent.StartFill.MouseButton1Click:connect(function()
    local plr = game.Players.LocalPlayer
    local Age = plr.AccountAge
    local Name = plr.Name
    local gui = script.Parent
    script.Parent.PlrName.Name.Text = (Name)
    script.Parent.Age.Text = (Age)
    script.Parent.Parent.StartFill.Visible = false
    script.Parent.Parent.CheckApp.Visible = false
    gui.Visible = true
    gui:TweenSize(UDim2.new(0,822,0,562), "In", "Quint", 1)
end)

0
It gave me this error "Players.ThatGamer883.PlayerGui.Applications.Main.FillOut.Tween2:6: attempt to index field 'Name' (a string value)" Ize_Cubz 18 — 6y
Ad

Answer this question