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