Still have questions? Join our Discord server and get real time help.
Log in to vote

How do I remember how functions work easier?

Asked by
net_h 13
5 months ago

Some gentleman called SimpleFlame (?) posted this line of code for me local part = script.Parent

-- Create a new click detector
local ClickDetector ="ClickDetector")
ClickDetector.Parent = part
ClickDetector.MaxActivationDistance = 10 -- Max distance a player can click the part
-- Set up the click function so our part can listen for clicks
local newPart ="Part")
newPart.Name = "SpawnPart"
newPart.Parent = workspace 
Get the character from the playerWhoClicked parameter 
 local characterWhoClicker = playerWhoClicked.Character
 local head = characterWhoClicker.Head -- Position the new part to the same position as the head plus 5 studs in the Y direction
newPart.CFrame = head.CFrame +, 5, 0)

and while as a beginner this is somewhat difficult i found remembering it harder, any helps on this? maybe a simple explainatiion to each function/command shown here?

1 answer

Log in to vote
Answered by 5 months ago

Your best friend when trying to remember what does what when coding is google. Specifically the api listing on

For example, if you need to remember what a ClickDetector is or how to use it, just type "roblox clickdetector" in google, and you'll get the full api listing and usually examples of how to use whatever you are looking up. If you google something and aren't getting good results then you can narrow your search to just the roblox site. For example, if you are wanting to look up the roblox player object, a google search of "roblox player" will get you a lot of useless results, but if you type ""site: player" it will give you exactly what you need.

Look things like this up enough times and pretty soon you start to remember more and more, and if you're still stuck after looking something up then there are sites like this and the roblox forums where you can ask specific questions.


Answer this question