How do I reference numbers? For example, In my game I have this checkpoint system, each checkpoint is named: “1”; “5” etc. When I did a WaitForChild this auto completed:
Crazyman32: In Lua, passing by reference vs. passing by value is implicit. Functions, tables, and userdata are passed by reference, while strings, numbers, and booleans are passed by value (e.g. they’re copied). Right, I didn’t even realized that Functions, and Userdata are pass by reference.
I’m in the middle of making a marble race inside of Roblox Studio and I want to make a platform that teleports the marble to another position, I know how to reference a player, but how do I do the same with a object like a marble?
Welcome! This tutorial aims to help people understand Luau’s type annotation feature, and how to write code that’s smarter and easier for other experienced developers to pick up and understand within Roblox’s ecosystem today! What are Type Annotations? Type annotations are a feature of Luau that allow you to define constraints to the variables in your code. They provide contextual clues ...
I want to be able to get an instance’s unique reference id (the kind that is printed when setting an instance as a dictionary key) in order to add a string at the end of it for indexing a table (experimenting with ECS). I don’t know how to find an object’s reference id outside of printing it from a table, then using log service to read the output which is very gimmicky and inefficient ...
Hello there! This tutorial is meant for beginners, although anyone is more than welcome to follow along. This will cover referencing items and how relationships between the items are. Lets get started. Parent-Child Relationships Roblox uses the format Parent-Child or Hierarchy system with everything that shows/interacts with your game. Image A child can be a parent, having something above, and ...
game.workspace["2a"].Value.Value = -- blah blah blah This way you can use a number in a part name and still have the script refer to the part correctly.
When using numbers on Roblox, there is a max number, which I believe is 2,147,483,647 . However, some people get around this, such as Mining Simulator: What methods can you use to do this?
The PlaybackSpeed of the Sound is supposed to randomly change to any number between 0.9 and 1.1, but I currently do not know how to do this without setting up an excruciatingly long table of possible values.