r/lua • u/Practical-Garden7505 • Oct 31 '26
Help Lua client sided
Does anyone know how to make something not client sided and show for other people on a five m server seems ai can’t figure it out or I need server resource files there’s gotta be another way
0
Upvotes
5
u/itsDesignFlaw Oct 31 '26
This would be one of those occasions where I'd gladly read a transcript from your AI NGL xd
2
u/ripter Oct 31 '26
What? Maybe have the AI help you figure out what you want first. Then maybe it can help you do it. “Not client sided” would be server side, but the server can’t just randomly show people things, you need some kind of client to talk to the server. Like a web browser. I have no idea what “a five m server” is. Do you mean file server? That won’t be enough, you need a webserver. You can write one in Lua.
1
u/-goldenboi69- Oct 31 '26
https://www.reddit.com/r/lua/s/yz2AVCUt3V
1
u/oHolidayo 29d ago
You need to read the very user friendly documentation on the FiveM website. You’re going to always have a client side if you want people to see it. What you are looking to do is have the server call the client functions so the calls are only triggered by the server and not the users client. Without anymore information I can’t explain it anymore than that. I’m guessing your AI can’t do it because the server can’t display much on the client. It needs to trigger a client function.
0
u/faustinresources 22d ago
You can't skip the server part on FiveM, but it's a small file. The usual pattern is: client asks the server, server tells everyone.
client.lua
server.lua
Add both to fxmanifest (client_script / server_script) and that's it.
If it's an object or vehicle, you don't even need events: create it as a networked entity (CreateObject with isNetwork = true) and with OneSync everyone nearby sees it. For values other players should read, look up state bags (Entity(ent).state), they sync for you.