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

How to make an NPC jumpscare the player when it is attacking it?

Asked by 4 years ago

I have made an AI that finds you and kills you. The problem is that I can't find a proper way to make a jumpscare when it attacks you. The Jumpscare should zoom to the AI's head and make a loud screaming sound!

Here's is the attack function:

function attack(target)
    if (myRoot.Position - target.Position).magnitude < 5 then
        if target.Parent ~= nil then
            target.Parent.Humanoid:TakeDamage(100)
        end
    end
end

1 answer

Log in to vote
0
Answered by
gjlkv1 11
4 years ago

Should make a local decal avaible basicly if you dont want a in game npc jumpscare

Ad

Answer this question