Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 5 years ago
Edited 5 years ago

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.

0
You're using data persistence in your scripts, and not a data store. TheeDeathCaster 2368 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago

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.
Ad

Answer this question