Two worlds, one resource
This is one of the first big FiveM ideas that confuses beginners. Your resource folder looks like one thing, but it actually runs as two separate programs: one on the server, one on each player's PC. They do not share variables, and they do not secretly sync. By the end you will be able to point at any line in a resource and say which world it runs in, and how the two worlds talk to each other.
Build it
Make the resource folder
Inside your server's resources folder, create this folder:
resources/qu_two_worlds
Create the files
Create this exact file layout:
resources/qu_two_worlds/
fxmanifest.lua
config.lua
server.lua
client.lua