US Trends

what is , and . in roblox

In Roblox Lua, . and : are not the same: . is used to access a function or value on a table, while : is used to call a method and automatically passes the table as self.

What . means

  • object.functionName means “get this function or value from the object.”
  • Example: module.DottedFunction() calls the function directly without automatically passing the object.

What : means

  • object:functionName() is shorthand for object.functionName(object).
  • Example: module:ColonFunction() passes module in as the first argument, which is why it’s common for class-like or OOP-style code.

Simple example

  • Part.Touched uses . because you are accessing the event.
  • event:Connect(function() ... end) uses : because Connect is a method that expects the event object as self.

One-line rule

Use . to access , use : to call methods that should receive the table automatically.

Quick note

If you meant , and . in Roblox chat or typing, tell me the exact context, because in scripting the important symbol difference is usually . vs : or .. for joining text.