I'm trying to get a function that is in a table, but I keep getting a boolean. Why?
Table:
local CreditItems = {
["Blue TextOutline"] = function(Player)
local Data = GetData(Player)
Data["CreditItems"]["Blue TextOutline"] = true
Data["Chat"]["TextOutline"] = Color3.new(0,0,255/255)
game.ReplicatedStorage.ShopInfo.SendDataS:Fire(DataTable)
end;
["Blue Chat Name Color"] = function(Player)
if not Player then return end
local Data = GetData(Player)
if not Data then return end
Data["CreditItems"]["Blue Chat Name Color"] = true
Data["Chat"]["TextOutline"] = Color3.new(0/255,0/255,255/255)
game.ReplicatedStorage.ShopInfo.SendDataS:Fire(DataTable)
return true
end};
~~~~~~~~~~~~~~~~
Activation:
local Data = GetData(Player) local ItemPrice = CreditPrices[tostring(ItemName)] local ItemFunc = CreditItems[tostring(ItemName)] if Data and ItemPrice and ItemFunc then
Output:
10:25:04.172 - ServerScriptService.Shop:179: attempt to index field '?' (a boolean value) 10:25:04.173 - Stack Begin 10:25:04.174 - Script 'ServerScriptService.Shop', Line 179

2 comments
You aren't even calling either of the functions in the table? Here's a link because I have no clue what you're to accomplish here: http://wiki.roblox.com/index.php?title=Function#Functions_Within_Tables
Didn't you already ask this question?