:GetAsync() making the game unplayable when used

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    I wanted to save tables for a custom prefix system i’m making for my game. The video shows that the script breaks everything when enabled. Sorry if it’s too long.
    If you need timestamps:
  • 0:04 Enabling the script
  • 0:26 game explosion
  1. What is the issue? Include screenshots / videos if possible!
    The issue is, whenever i want to use :GetAsync() on a DataStore, the game is unplayable.

  2. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    I didn’t try any solutions.

Here’s the code for it if you need it.

local DataStoreService = game:GetService("DataStoreService")
local Prefix_Data = DataStoreService:GetDataStore("Prefix_Data")

local Data
local succ, result = pcall(function(...) 
	Data = Prefix_Data:GetAsync("PREFIX_DATA")
end)
print(Data)
1 Like

oh wait i forgot to upload the video my bad
https://streamable.com/fdz95t

1 Like

Try this script, it will only print if it’s successful, and will print what error you are meeting.

local DataStoreService = game:GetService("DataStoreService")
local Prefix_Data = DataStoreService:GetDataStore("Prefix_Data")

local Data
local succ, result = pcall(function(...) 
	Data = Prefix_Data:GetAsync("PREFIX_DATA")
end)
if succ then
print("success")
print(Data)
else
print("Failed")
warn(result)
end
1 Like

still doesn’t work
it has a success, but then it just bugs out the game entirely
image

i’ve even tried using while task.wait(1) do to see if it does anything but it just prints out success
it’s like the game is never loading, but the :GetAsync() is functioning properly
image

ok it’s tweaking (i haet 30 carahhcjksa)

dude sometimes it works sometimes it doesn’t!!!

i think it’s cause i had CharacterAutoLoads set to false (?)

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.