Original Post - 06/18/2025 10:36 AM *(edited)

aets

Posts: 25

have u ever wanted to make really cool ....................... or slop games.................... then this is the perfect tutorial for you

ok lets start with the basics

> print(string)

this prints out a value in the developer console in-game or in the studio output

> Instance.new(obj, par)

this creates a new instance

obj = the object class (i.e "Part")

par = the parent (i.e game.Workspace)

to manipulate the values of the instance, make it into a variable

here's an example

local instance = Instance.new("Part", game.Workspace) instance.BrickColor = BrickColor.new(1) -- this will make the part white

> if () then end

well, self explanatory, but it's different from most programming languages

  1. there isnt !==

instead, there is

if (par1 ~= par2) then print("par1 is not equal to par2") end

> okay, how do i detect if someone clicked on my part?

put a ClickDetector inside the part, and place a script either in the part, or in the ClickDetector

example:

  1. if you put the script into the ClickDetector:

script.Parent.MouseClick:connect(function() end)

or, if you want to keep it clean by using named functions:

function action() print("i was clicked!") end

script.Parent.MouseClick:connect(action)

  1. if you put it in the part

script.Parent.ClickDetector.MouseClick:connect(function() end)

function action() print("i was clicked!") end

script.Parent.ClickDetector.MouseClick:connect(action)

a common mistake people make when using putting functions is adding () you only need to pass the name

i will continue this later because i ran out of ideas

if any of these examples don't work please PM me and i will fix it :D

3
3
0
Reply - 06/18/2025 03:56 PM

moot

Posts: 24

lazy

-1
0
1
Reply - 06/18/2025 09:15 PM

salient

Posts: 7

if only there were a place that could tell you absolutely everything about luau

1
1
0