DEV Community

Kaede Games ๐ŸŽฎ
Kaede Games ๐ŸŽฎ

Posted on

Roblox ๐ŸŽฎ How to set multiple augments in RemoteEvent

Be careful when setting multiple augments in RemoteEvent of Roblox.

Firing Side

demoRemoteEvent:FireClient(player, value1, value2, ...)

Enter fullscreen mode Exit fullscreen mode

Event Side

demoRemoteEvent.OnClientEvent:Connect(function(value1, value2, ...)
    print("value1: "..value1)
    print("value2: "..value2)
end)

Enter fullscreen mode Exit fullscreen mode

It's important that you shouldn't contain player in the Event function side.

Top comments (3)

Collapse
 
premiumsolutions profile image
Premium Solutions • Edited

Good point about not including the player on the client side of the RemoteEvent! When firing from the server, Roblox automatically includes the player as the first argument with FireClient, so you donโ€™t need to pass it on the receiving end.

Example:

Server Side

demoRemoteEvent:FireClient(player, value1, value2)
Enter fullscreen mode Exit fullscreen mode

Client Side

demoRemoteEvent.OnClientEvent:Connect(function(value1, value2)
    print("value1:", value1)
    print("value2:", value2)
end)
Enter fullscreen mode Exit fullscreen mode

This keeps the data clean on the client side and prevents errors. I've also applied it on my site Fluxus Executor. Thanks for sharing this tip!

Collapse
 
alishay_noor profile image
alishay noor

In Roblox Adopt Me, understanding adopt me pet values is crucial for making successful trades and growing your inventory. Pet values are determined by factors such as rarity, demand, and special attributes like Fly, Ride, Neon, and Mega. Rare pets, like Neon and Mega Neon versions, often hold higher value than common ones. Knowing these values allows you to make informed decisions, avoid overpaying, and ensure that your trades are fair. Whether you're looking to upgrade your pets or maximize your profits, understanding pet values is key to thriving in the Adopt Me world.

Collapse
 
dannymorson profile image
dannymorson

Hey there! ๐Ÿ‘‹ When setting multiple arguments in RemoteEvent for Roblox, be cautious. On the firing side, use :FireClient(player, value1, value2, ...), and on the event side, connect with OnClientEvent:Connect(function(value1, value2, ...) without including the player. Happy coding! ๐Ÿš€ #RobloxDev ๐ŸŽฎ

Some comments may only be visible to logged-in visitors. Sign in to view all comments.