server script:
f = false
script.Parent.MouseButton1Click:Connect(function()
if not f then
f = true
for i,v in pairs(game.Workspace:GetChildren()) do
if v.Name:match(script.Parent.Parent.Parent.Parent.Parent.Name) then
local player = game.Players:GetPlayerFromCharacter(v)
if player.leaderstats.Money.Value >= 15 then
player.leaderstats.Money.Value = player.leaderstats.Money.Value - 15
script.Parent.Parent:Destroy()
end
end
end
end
end)
on line 6 it says
Players.world_kiIIer.PlayerGui.rank.Frame.yes.yes:6: attempt to index field 'Parent' (a nil value)
why does this happen?

2 comments
Can you show the "Players.world_kiIIer.PlayerGui.rank.Frame.yes.yes" script?
that is the script