Hello. I have a problem with my shop Gui.
local price = script.Parent.Price
local price2 = script.Parent.Parent.Info.Price
local price3 = script.Parent.Parent.Info.ItemPrice
local name = script.Parent.ItemName
local name2 = script.Parent.Parent.Info.ItemName
local name3 = script.Parent.Parent.Info.ItemName1
local image = script.Parent.ItemImage
local image2 = script.Parent.Parent.Info.ItemImage
script.Parent.MouseButton1Click:Connect(function(player)
print("Hey")
price2.Value = price.Value
price3.Text = price.Value
name2.Text = name.Value
name3.Value = name.Value
image2.Image = image.Value
if player.PlayerTools:FindFirstChild(player.PlayerGui.Shop.ShopFrame.Info.ItemName.Text) then
print("Hola")
player.PlayerGui.Shop.ShopFrame.Info.Buy.Text = "Equip"
end
end)
The Error is: Players.Zelt3q.PlayerGui.Shop.ShopFrame.Item1.Script:18: attempt to index nil with 'PlayerTools'
Btw I have a folder named PlayerTools

1 comment
Define the localplayer