Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

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

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.

3 comments

0

What is PlrName?

0

The name of the player

0

i think if you use that one it would probably work

1 answer

✓ Accepted answer

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.

This discussion is preserved as it was. New answers, comments, and votes are closed.