Questions tagged [roblox]

Roblox is an online development platform, created in 2006, and targeted at children and youth. Roblox uses a modified version of Lua, known as Luau, to support Roblox games.

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. 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.

Before posting a question, users should ensure they've used the available debugging tools to collect information about the problem they're encountering.

For more information on Roblox, visit the developer hub.

2196 questions
2
votes
2 answers

how to send tool to "StarterPack" in lua

i am currently creating a mining game and im trying to add breakable blocks. so im trying to create a script when broken put ruby into StarterPack. my files: Ruby(part): Hit(click) ParticleEmitter(particle emitter) …
gleacc
  • 78
  • 9
2
votes
0 answers

So I'm trying to make a bot that signs up to roblox with puppeteer and ghost-cursor

At the moment, I've got it so then it types in a username, then clicks the drop down menu to select the month, but when I go to actually make it click the month, it just throws an error. Any help? This is the code I've got so far: const puppeteer =…
mystic
  • 21
  • 2
2
votes
1 answer

Roblox script error: ServerScriptService.CheckpointsScript:31: attempt to index nil with 'leaderstats'

I can not resolve this by my self. Thank You for helping. This is my first stackoverflow question :3 Roblox Studio information: Latest available version as of 2022 October 03 Picture of about…
2
votes
1 answer

How to save a BoolValue in a DataStore System

I'm trying to make a system that saves a value so that if the player has that value then he gains the powers of that particular item but I'm not able to make that happen. There are no errors in the output and the powers are not forwarded to the…
takezo
  • 101
  • 7
2
votes
2 answers

How to Optimize an Overuse of If Statements in Roblox Studio

The goal of this code is to spawn a ball "GlowyBall" in 1 of 5 preset locations randomly. This script activates when a player hits a button. The ball also needs to spawn as 1 of 3 colors randomly. The code works for the most part, but I am…
E Skees
  • 31
  • 4
2
votes
1 answer

how should I fix While True loop repeating and stopping unwantedly (Roblox)

I am trying to make a part duplicate then delete the duplication script with the new part without deleting the script in the old part, this is in Roblox studio. This is my code local block = script.Parent while true do local xrange =…
Ch8D
  • 35
  • 5
2
votes
3 answers

Why is my teleporting not working? (Roblox)

so in my game, I made another place in the asset manager. For some reason I cant teleport to it. It says teleport failed and in the console it says the place is not published. The game is published. And I dont think you have to publish places. I am…
TrulyBlue
  • 35
  • 8
2
votes
2 answers

Run function when global variable is updated lua

Hello I have a lua global variable used as a settings config made of a list of arrays. I have buttons that visually update when clicked, updating a section of an array. There are other ways to change the settings besides clicking however, but I am…
Jordan
  • 33
  • 3
2
votes
1 answer

Error: attempt to index nil with 'Agility'

Having problems with one script, I'm getting this error: Workspace.AgilityZone.HitboxSide.Script:3: attempt to index nil with 'Agility' - Server - Script:3 script.Parent.Touched:Connect(function(hit) local player =…
Slite
  • 27
  • 5
2
votes
3 answers

How to give X, Y, Z different values from the same math.random() function?

Basically what i want is: local X, Y, Z = math.random() Without assigning each value to math.random(): local X, Y, Z = math.random(), math.random(), math.random()
Deludank
  • 43
  • 6
2
votes
1 answer

How to aim a gun where the camera is pointing?

I have a fixed "Over-The-Shoulder" camera system, and i want to aim the gun where the camera is pointing at. My best bet was to use the CFrame.Rotation, but it didn't work so well. That's when i tried, getting the angles from the camera every time…
Deludank
  • 43
  • 6
2
votes
2 answers

How to make a script only work on join in roblox

How do I make it so the following Roblox Lua code runs on join? I've tried wrapping it in a connect function but that makes the MouseButton1Click detector stop working. This is the code for when you load into the game, I tried putting…
BlitzDBS
  • 51
  • 1
  • 6
2
votes
3 answers

If Statements in Lua

In all other programming languages I've encountered, if statements always require a boolean to work, however in Lua the following code does not contain any errors. What is being checked in this if statement if both true and false statements can't be…
Rrunr
  • 35
  • 1
  • 4
2
votes
2 answers

What is the equivalent of border-radius in roblox studio?

I have been previously working with css and there is a property in that i.e., border-radius with which i can change the radiuses of all the four sides independently. Now i have started making roblox games and i want to round my GUI elements but i…
Learner
  • 77
  • 6
2
votes
1 answer

Understanding how to access objects in lua

The closest i've gotten to figuring this out, came from this post Understanding how to access values in array of tables in lua which actually has the most useful information i've seen. However, I'm still running into a minor issue that I hope…
netsocket
  • 117
  • 1
  • 10