My script doesn't work (Info when YouAreInSpawn)


I wish I had a message when players go to the spawn area but it does not work !

Can you help me in my script ?, i’m not a pro coder Lua.

hook.Add("Think","YouAreInSpawn",function( )
        for I,E in pairs(ents.FindInBox(Vector(645, -890, -137),Vector(1113, 784, 56))) do
			draw.WordBox( 8, 5, ScrH() / 2, "YouAreInSpawn ! ", "Default", Color(255,100,100,200), Color(255,255,255,255))

Ty ! :slight_smile:

use hook.Add(“HUDPaint”,“YouAreInSpawn”,function( )

and don’t use ents.FindInBox, just check if the player’s position is between those two vectors.

But how i’m not prop codder ^^
Pls help me :smiley:

local v1, v2, ppos = Vector(645, -890, -137), Vector(1113, 784, 56), LocalPlayer():GetPos()

if ppos.x > v1.x and ppos.x < v2.x and ppos.y > v1.y and ppos.y < v2.y and ppos.z > v1.z and ppos.z < v2.z then
–Draw your text here

Oh you have edit your post i test that ty !