-
Datastore methods such as
:GetAsync()or:SetAsync()will occasionally fail so you should wrap them in a pcall -
Your using
:SetAsyncon a .Changed event for multiple players which will put heavy load unto the datastore from multiple calls so fast. You can fix this by simply just using:SetAsync()when the player leaves or have your datastore save all the players data in a 1 minute interval loop. -
Using the parent parameter in Instance.new(“Classname”, Parent) is slower than just setting the parent property after setting all the other properties. More info on that here
-
You can do += on your points value to increase
Other than that the script is fine