✓ Accepted answer
Ok, so first, you may wanna fix your syntax, second, your problem is that when you're saying Tool.Parent.Name, your refering to Backpack, cuz the parent of the tool is backpack, and backpack is parented to your player, now fixing that should be easy. And btw, one of the biggest issues in your script is tahtyoure using global variables, its recommended to alwyas use local vars, and if they are local you always wanna put them outside of your function, or exaclty your scope, (scope is the content inside your function).
im not sure if you did this or not, but in order for this to work, a part named "Handle" should be parented to your tool.
now this should be your script:
local tool = script.Parent
local plrname = tool.Parent.Parent.Name
local plr = game:GetService("Players"):FindFirstChild(plrname)
tool.Equipped:Connect(function()
tool.Name = plr.AccountAge
end)
(this was tested and it worked)
so, if i explain again, we made all vars local and outside of the function, always do that, and we fixed the plr.Name, always expiremnt stuff, see if an obj is parented to another, see if somethin is duable... always fo this stuff
https://gyazo.com/cc754edbb2665956c1a7f9c260854ddd
happy to help!
8 comments
oh that gyazo link is mest up xd
i was gonna show what is tool parented to when game is running
text please
howhow? @kingdom5
he just told u
Thank you, but how do I do a target? Say I want make the bricks color to Brown. How would I do that? Thanks anyway if you can't answer this.
part.BrickColor = BrickColor.new("Brown") ?
??