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

This local script is giving me an error even though I fixed it?

Asked by 6 years ago
script.Parent.Parent.StartFill.MouseButton1Click:connect(function()
    local plr = game.Players.LocalPlayer
    local Age = plr.AccountAge
    local plrname = plr.Name
    local gui = script.Parent
    script.Parent.PlrName.Name.Text = (plrname)
    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)

These lines of code give me this error: Players.ThatGamer883.PlayerGui.Applications.Main.FillOut.Tween2:6: attempt to index field 'Name' (a string value) I have not found out the reason why.

0
What is PlrName? pi3dot14 0 — 6y
0
The name of the player Ize_Cubz 18 — 6y
0
i think if you use that one it would probably work ConectionPoints 0 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago

It’s probably because on line 6, the script is thinking it’s trying to get the name property instead of the name text. Rename “Name” on line 6 into anything else and rename the text object to that.

Ad

Answer this question