Garry's Mod Wiki


Player:SendLua( string script )


Executes a simple Lua string on the player.

If you need to use this function more than once consider using net library. Send net message and make the entire code you want to execute in net.Receive on client.
The string is limited to 254 bytes. Consider using the net library for more advanced server-client interaction.


1 string script
The script to execute.


Sends "Hello World" to the client's console.

Entity( 1 ):SendLua( "print( 'Hello World' )" )

Page Links

Special Pages



Render Time: 62ms

DB GetPage 5
Generate Html 5
SaveChanges (1) 29
Render Body 0
Render Sidebar 20