local plr = game.Players.LocalPlayer
local event = game.ReplicatedStorage.BuyEvent
local item = script.Parent.Parent.SelectedItem.Value
local price = script.Parent.Parent.ScrollingFrame:WaitForChild(item).Price.Value
script.Parent.MouseButton1Click:Connect(function()
if script.Parent.Text ~= "Owned" and game.ReplicatedStorage:WaitForChild(plr)[item].Value ~= true and plr.leaderstats.Money >= price then
event:FireServer(item, price)
script.Parent.Text = "Owned"
end
end)
any idea because I'm stumped

2 comments
Line 7.
WaitForChild(plr)[item].Value is it supposed to be like this? Because item variable already has .Value