What is :Friends()?

I see it used all the time in code, here is an example.
What is it? What does it do? Why it? I’ve never seen anything about it so some education would be gladly appreciated.

events.CreateWorld.OnServerEvent:Friends(function(plr)
	if not joiningWorld then
		joiningWorld = true
		local worldId = createWorld(plr.UserId, plr.Name)
		TeleportService:Teleport(worldId, plr)
	end
end)
5 Likes

roblox lua doesn’t contain a :Friends() connector.
but you may be able to find what you’re looking for in the TeleportService documentation:

1 Like

RemoteEvent? Buddy where did you find this code

2 Likes

Assuming CreateWorld is a RemoteEvent, this code is not valid. .OnServerEvent of RemoteEvents are RBXScriptSignals, which do not have any method called :Friends, they only have the :Connect, :ConnectParallel, :Once and :Wait methods. You can read more about them here:

1 Like

do they kno​​​​​​​​​​​​​​​​​​w ​​​​​​​​​​​​​​​

most people here aren’t very bright

1 Like

Took me way too long to realise this was a joke about Roblox renaming Friends to “Connections” :man_facepalming:

8 Likes

sorry guys for wasting your time :sob:
this post WAS serious, but i had a tampermonkey script installed that would automatically rename Connections to Friends and because of that it would rename everything on the Roblox domain (including the devforum and stuff like that) that included ‘Connect’ to Friends and i only remembered that now because of this reply, i thought it was some new roblox thing that everybody was using or something :skull:
uhh this thread can honestly be closed mb

8 Likes