Questions tagged [roblox]

Roblox is an online development platform targeted at kids and teens. It was created in 2006. Roblox uses Lua that has been modified by the Roblox team, known as Luau, to support Roblox games, which is fairly simple and easy to use.

Roblox is a free user-generated gaming site that makes players the architects of their own 3D worlds. Parts of the platform are a variety of objects, a scripting language and a website to host games. With a free account, one gets a character and a place, that can be customized. [ Source: developer.roblox.com ]

Roblox uses Lua, a lightweight programming language embedded into each game. It is easy to use and allows users to manipulate their games in any way possible. Roblox uses their own version of Lua 5.1, edited to work with the games, called Luau, which features type checking and various optimizations. An example would be the removal of tailcalls, making them not re-use the call stack, in favor of easier debugging. Luau allows users to do things such as creating their own GUIs, making structures such as sliding doors, adding animation to bricks, teleporting and killing players, etc.

For more information on Roblox, visit the developer hub.

1032 questions
8
votes
4 answers

How does an object reference itself in Lua?

C# has this and VB has ME. What is the Lua equivalent? I am trying to reference the parent of the script class in Roblox.
Slim
  • 4,955
  • 7
  • 29
  • 29
7
votes
4 answers

How to Round to the Nearest Tenth?

Given any number of the sort 78.689 or 1.12 for instance, what I'm looking for is to programmatically round the number to the nearest tenth place after the decimal. I'm trying to do this in an environment where there is a math.floor() function that…
Splashsky
  • 129
  • 1
  • 9
6
votes
2 answers

Python PIL - Finding Nearest Color (Rounding Colors)

There is a game called Roblox, in which the player makes the game, usually of lego-looking bricks. In Roblox, for the Brick colors, you can use typical RGB values, but that'd require an additional element that is not very efficient when it comes to…
GShocked
  • 3,106
  • 7
  • 22
  • 42
6
votes
7 answers

How to call functions in other script files in Roblox

I have a script file embedded in the Workspace that contains functions. I would like call these functions from script files embedded in child objects of the Workspace. I don't want to have to copy and paste these functions into multiple script…
Slim
  • 4,955
  • 7
  • 29
  • 29
5
votes
2 answers

How do I get the current time in Roblox (consistent across all servers)?

In my Roblox place, I want to get a value representing the current time which is consistent across all running servers and places in my game. I already know about the Time function, but the documentation for that function seems to indicate that it…
Ajedi32
  • 36,408
  • 19
  • 117
  • 155
5
votes
2 answers

How to end a looping coroutine in Lua?

I'm currently working on a game using Roblox (which uses Lua). It is a basically made up of several minigames. At the beginning of each round, all the players in game are put in a table and teleported to an area. That is where the coroutine comes…
user3314993
  • 267
  • 1
  • 4
  • 10
4
votes
3 answers

ROBLOX Lua Error in script: '=' expected near ''

Hello I am writing a scipt on ROBLOX and I have encountered a problem. function showVictoryMessage(playerName) local message = Instance.new("Message") message.Text = playerName .." has won!" message.Parent = game.Workspace wait (2) …
4
votes
1 answer

Can HTML markup be added to a website using a chrome extension?

I am trying to create a Chrome extension that creates a button like a normal one that displays a custom page I made (this has already been done and works on my extension) but the next thing I wish to do, and I am not sure how to implement, is to…
POC0bob
  • 53
  • 3
4
votes
4 answers

Variable names in table field not working

I came across a problem while writing some code up for a game. It seems I can't use variables in statements like; local Username = "Cranavvo" game.Players.Username:BreakJoints() -- Kills the player And the output is telling me "No such user as…
Connor Simpson
  • 459
  • 5
  • 26
3
votes
2 answers

Roblox Lua if statement still executing even when the value isn't true

this has been a major problem in my game. I have been trying to make a script that will detect when a value is 1, 2, 3, 4, or 5. However, the if statements will still execute even if the value is 0, making the timer start before anyone can get into…
p0laris
  • 53
  • 3
3
votes
2 answers

Roblox Lua: I can't do arithmetic in the middle of print()

I am trying to put Rich as a variable, in the middle of print("You are" + print(Rich + 1) + "Rich"). It's inside a function so that whenever the player makes a part, which is going to be money in this case, their richness goes up by one: …
3
votes
1 answer

Touched function Roblox Studio

I am coding an obby on Roblox Studio. In this obby, I have parts that the character jumps on (the parts are roughly 10 by 10 studs). I want to achieve that whilst the character is on a part, that part changes color. local platform =…
Paul
  • 1,045
  • 4
  • 22
  • 46
3
votes
1 answer

Why does my Roblox joining badge not work?

I made a visiting or thanks for joining badge that I made to be given to any new person that joins my game, but it only works sometimes. I couldn't try anything, the badge gave it to 60 people when 146 people joined! All 146 people were supposed to…
Alex Y
  • 31
  • 1
3
votes
1 answer

How do I make a chat message appear when a player joins my game

So I have looked all over the web for a script that makes it so that when anyone joins my Roblox game it displays a message in chat (for example: "Player has joined my game"). This is the best that I've found: local Players =…
Gamer 01
  • 31
  • 5
3
votes
1 answer

Scan a google document line by line

so basically, I'm trying to use node.js to scan a google document, then if a ROBLOX id is on there it tracks it. When it tracks it, if it joins one of the groups in the id list, it auto-exiles it. Any help? I'm a little stuck on the scanning a…
Ross
  • 128
  • 12
1
2 3
68 69