I am trying to add a creator tag to my gun tool but every time I use it against an enemy NPC, it doesn't work. My problem in the Output bar keeps showing this:
Players.Simpletton.Backpack.Italian Gun.Scripts.BackendScript:131: attempt to index upvalue 'hit' (a function value)
if anyone can help here's the creator tag script My creator tag script:
if hit.Parent.Humanoid.Health <= 0 then
local creator = Instance.new("BoolValue", hit.Parent.Humanoid)
creator.Name = "creator"

5 comments
Please provide the full code. The only issue I see is you're doing something like
local function hit(...) ... endand then you're trying to index that function.edit your question.. dont put it in a comment lmao. v edit button right there
uhh you mean add the entire gun script?
https://devforum.roblox.com/t/psa-dont-use-instance-new-with-parent-argument/30296
;-;