I'm testing stuff out with data stores, and when I tried this script it said GetAsnyc is not a valid member of data store. I did everything correctly what the wiki said to do.
Script:
local ds = game:GetService("DataStoreService"):GetDataStore("TestColor") while true do wait() if ds:GetAsnyc("color") == 1 then script.Parent.BrickColor = BrickColor.new("Bright blue") elseif ds:GetAsnyc("color") == 2 then script.Parent.BrickColor = BrickColor.new("Bright red") else script.Parent.BrickColor = BrickColor.new("Institutional white") end end
GetAsync - you had a typo lol, also DataStores can only have 100 requests per minute server-wide.. by only having wait() for a yeild in your loop(1/30 seconds) you're going to exceed the limit a lot.. So I put wait(5). Also I revised your script a bit.
local ds = game:GetService("DataStoreService"):GetDataStore("TestColor") local colors = {BrickColor.new('Bright blue'),BrickColor.new('Bright red'),BrickColor.new('Institutional white'} while wait(5) do script.Parent.BrickColor = colors[ds:GetAsync('color')] or BrickColor.new('Dark stone grey') end