--[[{"Destructable":true,"Health":20,"State":"Crate1","Holdable":true}]] --(table)
function grabData(object)
	local dataTable
	if object:WaitForChild("Data",0.001) then
		dataTable = game:GetService("HttpService"):JSONDecode(object.Data.Value)
	end
	print(dataTable.Holdable) -- always prints nil?
	if dataTable == nil then return nil else return dataTable end
end

It should print true, but always prints nil, even when there is a value for it?

2 comments

0

can you tell us where you use the function, what for?

0

It has everything you need to know, I use it to check if an object can be carried and if it needs to display a pickup display