Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

how to get a npc to activate a tool?

Asked by 3 years ago
Edited 3 years ago

im trying to create a npc that uses a staff this is my script:

local staff = script.Parent.BoonStaff
local rarm = script.Parent:FindFirstChild("Right Arm")
local larm = script.Parent:FindFirstChild("Left Arm")

function dmg(hit)
    if hit.Parent ~= nil then
        local hum = hit.Parent:findFirstChild("Humanoid")
        if hum ~= nil then

            part that activates the tool should be here

        end
    end
end

rarm.Touched:connect(dmg)
larm.Touched:connect(dmg)

im looking for maybe a property of the tool that i can put as true or something

Answer this question