12/25/2023 0 Comments Get player from character roblox![]() ![]() from the server side part of the function. If I need to give data to a single client, I always found it made more sense to have the client ask for that information first using a RemoteFunction, where instead of the server having to do RemoteFunction:InvokeClient(player. On a sidenote, I’ve never found a need to send data to any particular client from the server. Where Roblox automatically removes the Player argument, since the client doesn’t need it. The client code will receive it like this: Remote.OnClientEvent:Connect(function(inventory) Similarly, if I wanted to send some save data to an individual client, my server code would look something like this: local Player = ![]() The Player who fired that remote is automatically added there by Roblox. The server will receive it like this: Remote.OnServerEvent:Connect(function(Player, cameraPos) Roblox game location (Rightclick on Roblox and select 'avatar' Now go to Here are the 'Open file location' 1 Locate the folder and click icon and select its file location Step 2 Open steps to get the 'content' folder the Roblox game on your PC in Roblox Step Step 3 Open a headless character on 'Roblox Player'. Something to understand about RemoteEvents and RemoteFunctions is that they prepend a Player argument when the server is receiving, and you have to prepend a Player argument yourself when your server code is sending information to individual clients (unless you’re using RemoteEvent::FireAllClients).įor example, here’s some client code that sends the local player’s camera position to the server: local cameraPos =
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |