Slenderman AI Scripting Help Needed

Hello guys my coding is horrible i made a slenderman model and im trying to make a slenderman game but im stuck at alot of things since i cant script myself and currently i dont have money to hire someone, so i need a AI script for slenderman model that when player looked to slenderman slenderman will teleport chase player and when slenderman near is the player the player will get a static effect on the screen and will die after like 5, or 6, seconds. and sometimes slenderman will be teleport to a random player from current server and if player dont look at slenderman slenderman will gave the player static effect and go away and if slenderman cant kill all players in server on 8 minutes he will be destroyed with a animation and a gui will appear that tells player “YOU ARE SURVIVED” or “YOU DIDNT MAKE IT”

1 Like

Unfortunately we cant really make code for you.

But i suggest a few things:

You might want to use WorldViewportPoint, It can raycast from the position toward the object and see if the ray hits anything if yes then the player can see it/Toward the monster

You can also use magnitude to detect if slenderman is close to your chatacter

Lastly run a check (i suggest for loop) if players are still in game or not. If they are still then you do something to vanish the slenderman.

1 Like

I guess i cant make this game ik coding is so hard but thanks anyways to leave a time for my message

No prob, Starts from the basic and you will get used on roblox coding

IHere is more information if you wish to make the game:

An add-on to what @SHARPTHRIX has mentioned.

For a more basic run down.

You’ll want and likely use some form of Remote Events for those Guis and static effects. (if you make these static effects in Guis)

You’ll want the timer to be on the server and most likely need to set up a round system. And for the core settings of making sure everyone has died you’ll probably make to make a list of alive players, and remove the people if they have died / leave the game.

As for the Ai himself you have many options. You may want to look into something like PathFindingService as a starting point, and adapt with that, or you may want to make your own type of movement with raycasting etc.

And then as stated above you’ll want to use magnitude for the distance from the character and Slenderman, and WorldToViewportPoint for detecting if the player can see Slenderman on their screen.

If you want Some Videos Instead of roblox Documentation

** Havent fully seen a lot of these videos but most of these creators are well known

(PathFinding): https://www.youtube.com/watch?v=VWKNtqjPKn0

(Round System): https://www.youtube.com/watch?v=ESzmiC_AzLw

(Remote Events and Functions): https://www.youtube.com/watch?v=GwhPXyYKkwU

(Magnitude): https://www.youtube.com/watch?v=XJ10fJEit-I

(Raycasting (you might not need)): https://www.youtube.com/watch?v=CPcaJgQkxM8

(Move NPC to a Part / Point): https://www.youtube.com/watch?v=jv6JI6TmLtc

Hope this helps and lmk if you have questions!