So today I was scripting when I got… GASP AN ERROR!!!
Attribute name contains illegal character ' ' ("Left Leg")
Wowie zowie, anyhow I honestly have no idea how to fix this error: This is my code
function module.CreateObjValue(OBJ:Instance)
local objValue = script:FindFirstChild('Value')
objValue.Name = OBJ.Name
objValue.Value = OBJ
local animatables = module.GetAnimatables(OBJ)
print(animatables)
for Title, animatable:Instance in animatables do
print(Title,animatable.Name)
objValue:SetAttribute(tostring(Title),false) -- errors here
end
return objValue
end
I print Title which as it prints is:
Left Leg
So how do I solve this problem?