What info Remote function passes to the server script?

old scripting buddy left for college and im trying to learn more myself
we were working on a game

was trying to figure out how do i refer to u2 in my server script


In Roblox, the tuple type refers to a list of Lua variables. If a method accepts a tuple as an argument, that means it accepts multiple values. If a method returns a tuple, that means it returns multiple values.

can i get a example how i would refer to u2 in the server script?
got this from

game.ReplicatedStorage.Events.EquipTower.OnServerInvoke = function(player, u2)


I’m not sure what you mean. Are you not sure what u2 is? Why don’t you just print it out and see for yourself what is in the variable u2? It’s probably a table, or a number, a string, or something like that. It can be a lot of things, but not an instance (game object) because it’s a remote function and they can’t pass instances.

print("This is what u2 is: ", u2)
print("Invoking EquipTower with parameters u2...")

thats exactly what i have lol, what would i put in next time to refer to or pull information from u2

u2 most likely stands for userdata variable 2

you can say

print("Type of u2 is:", type(u2)")
print("typeof() u2 is:", typeof(u2)")

if you are still not sure what type of data it is

1 Like

thanks man i was trying to figure out how to print it thats exactly what i needed

1 Like