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?
Double check your parent directory, the only feasible error is that you're using too many .Parent addresses, and you eventually called for the parent of the game, which is nil.