i heard that you need to keep bindtoclose
also idk since my version still works
I took a look at your code and I donât understand cause in your old code you were trying to save players data when the server shut down but youâre already saving their data when they leave so you donât need to keep !
EDIT : plus youâre trying to get player but they doesnât exist since they leaved the game !
I will update the message where I send you the code !
i know since i keep getting this error BindToClose failed because the model is already being closed.
oops in mine code this is the part i forgot to look in my code
local mainstats = Player.Gmultis:GetChildren()
for v, ValueInstance in pairs(mainstats) do
if ValueInstance:IsA("ValueBase") then
Data[ValueInstance.Name] = ValueInstance.Value
end
end
You donât need mainstats since you can do Player.leaderstats:GetChildren() !
yeah i know but ill keep it since it still works so ye
i use 4 different leaderstats scripts since in 1 script a lot of them wont be created
hi back again! hereâs a link to a similar issue i just helped a guy with
to use game:BindToClose(function()
as shown im my post
yeah since that i improved in scripting a lot now mostly i dont get errors and if i do i can fix them easily
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.