i'm trying to make a button that teleports you on click if you have a certain amount of a stat in leaderstats. but when i tested it in the output it said "09:48:46.017 - Money is not a valid member of Player"
but when i select children it is part of the player.
can anyone help? here's the script if needed
script.Parent.ClickDetector.MouseClick:Connect(function(plr)
if plr.Money.Value > 0 then -- here's the error "Money"
plr.Character.HumanoidRootPart.CFrame = CFrame.new(281, 30.6, -26)
end
end) thanks

5 comments
Can you show the hierarchy of the 'Money' instance?
Im still new to this whole scripting thing, what do you mean by hierarchy?
Show the whole parent tree of the 'Money' instance
Money - parent:leaderstats leaderstats-parent:player
is that ok?