model = script.Parent.Parent.Parent.CarSeat.Value.Parent.Parent function onclick () sell = script.Parent.Parent.Parent.sell.Value local stats = game.Players.LocalPlayer:FindFirstChild("leaderstats") if stats ~= nil then local cash = stats:FindFirstChild("Money") cash.Value = cash.Value + sell script.Parent.Parent.Parent:Destroy() script.Parent.Parent.Parent.Parent.Parent.Parent:remove() end end script.Parent.MouseButton1Click:connect(onclick)
it says: 00:01:16.443 - Players.Player.PlayerGui.Screen.Frame.TextButton.Script:10: attempt to index field 'Parent' (a nil value) 00:01:16.444 - Script 'Players.Player.PlayerGui.Screen.Frame.TextButton.Script', Line 10
Well, it looks like you already removed the script on line 9
script.Parent.Parent.Parent:Destroy()
So instead, I'd remove line 9 entirely, and change line 10 to say,
script.Parent.Parent.Parent.Parent.Parent.Parent:Destroy() -- remove is old school
Hope this helps! Let me know if it did.