I haven't fiddled with Data Store that much and I'm terrible at anything to do with BrickColors but I'm still pretty unsure why this is broken The main parts of the script are:
doba = script.Parent.Parent.Parent
script.Parent.Parent.Parent:WaitForDataReady()
ds = game:GetService("DataStoreService"):GetGlobalDataStore()
color = ds:GetAsync(player.userId .."currentpants") or nil -- problem occurs around here
if color == nil then
ds:SetAsync(player.userId .."currentpants",tostring(script.Parent.Parent.Parent.stats.lleg.Value))
color = tostring(script.Parent.Parent.Parent.stats.lleg.Value) -- should be bright blue
end
script.Parent.Parent.Parent.stats.lleg.Value = BrickColor.new(color)
script.Parent.Parent.Parent.stats.rleg.Value = BrickColor.new(color)
rleg & lleg are BrickColorValues
Any solutions?
EDIT: changed
color = ds:GetAsync(player.userId .."currentpants")
--to
color = ds:GetAsync(player.userId .."currentpants") or nil
still broken!

2 comments
What is the error you get?
I can't check, it runs in online mode.