added a chat bubble

How would i add a floating chat bubble over my npc entity?

You would need to create the chat bubble as an entity, and when that is done, you add something like this into your NPC code:
[lua] local bubble = ents.Create(“ChattBubble”)
bubble:SetPos( self:GetPos() + (self:GetUp() * 90) )
bubble:SetParent( self )
bubble:SetAngles( self:GetAngles() )
bubble:Spawn()
bubble:SetCollisionGroup(COLLISION_GROUP_WORLD)[/lua]

If there is anything else I or Facepunch can help you with, please say so.

Ok i have the entity but where do i place the chat bubble code?

Is your NPC created in entities/entities folder? Or, if you’re making a gamemode, is it in a gamemode file? You would add it in the same code that the NPC is.

-snip

yea but theres 3 files. cl_init.lua init.lua and shared.lua

In init.lua or inside
[lua]if SERVER then
– Here
end[/lua]
in shared.lua

so i put

[lua]
if SERVER then
local bubble = ents.Create(“ChattBubble”)
bubble:SetPos( self:GetPos() + (self:GetUp() * 90) )
bubble:SetParent( self )
bubble:SetAngles( self:GetAngles() )
bubble:Spawn()
bubble:SetCollisionGroup(COLLISION_GROUP_WORLD)
end [/lua]

in my shared file?