How could i make my script "faster?"

i know but if he put a server check that detects how many planks the player owns then they cant, example:

-- fires for 50 planks

-- if player have only 5 then return false
-- if players have 75 planks then planks = 75-50
-- give money plank * 50

EDIT: all server sided ofc

1 Like

As to the general question, I believe youre looping through an array here :for i,v in pairs(plr.Inventory.PlanksAndRocks:GetChildren()) do, so you should try using ipairs() instead

Also try using less remote functions

that sounds a bit easier, because im not gonna have to change like every script in the game