hi, i’m wondering why it says nil. i tried everything but i just says nil every
single time why does it keep doing that.
local script:
item_Target = mouse.Target;
item_String = item_Target.String;
for _, i in pairs(items) do
if i == item_String.Value then
part0 = item_Target; -- this one is for some reason nil
part1 = character.RightHand;
item.pickup(part0, part1)
end
end
end
end)
module script:
function item:pickup(part0, part1)
print(part0, part1) -- printed out and part0 is nil
end
hi, i forgot to say that i’m using ego moose’s construct that’s why the function is this “:” then this “.”
also i found the problem i used this “:” for the function in my module script but in the local script is was this “.”
this is the wrong because i’m using this “:” in the module script