Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

bool values datastore red lines in Stats and on boolvalue text?

hello so i created my own data store that will store a Potato BoolValue to key named PlayerBoolValues but i dont understand whats wrong with the script because its shows red lines under a Stats And Potato word can you say me whats wrong? Link https://imgur.com/a/oh0rQwG cant? Link2 https://ibb.co/n6XHrK

Thanks.

1 comment

0

You're using data persistence in your scripts, and not a data store.

1 answer

I don't think those are red lines, if they were those would be errors. I believe they are warning lines - just your colors are hard to tell. It wants you to change the variables to local since they are inside a function.

ex.

local Stats = Instance.new("BoolValue")
Stats.Parent = player
Stats.Name = "Items"

-- Also note that I changed the way you parented Stats.
-- It has been shown to reduce efficiency if you parent an object
-- from the Instance.new call.
-- It is better to parent it separately.

This discussion is preserved as it was. New answers, comments, and votes are closed.