r/lua • u/WigglesRllyWantsChez • Sep 14 '25
What did I do wrong 😭
I’m starting to learn how to code but I’m dumb
16
Upvotes
r/lua • u/WigglesRllyWantsChez • Sep 14 '25
I’m starting to learn how to code but I’m dumb
15
u/memes_gbc Sep 14 '25
after CFrame.new you have a closing parentheses
2
u/TomatoCo Sep 14 '25
Okay, that's a better screenshot but you really should just put your code in pastebin and link to it.
7
u/DapperCow15 Sep 14 '25
If you open the output/console view, it'll tell you everything that is wrong. If you're coding, you should honestly keep it open at all times. (Your question is already answered, I'm just giving advice)
1
u/[deleted] Sep 14 '25
Another kid fallen into roblox trap, becoming a child labourer producing slop games and earning nothing
1
u/DazzlingProgrammer61 Sep 14 '25
você declarou "humanoidrootpart" como "hpr" mas chamou essa varialvel com o nome "hrp"
1
u/Mental-Medium-7009 Sep 14 '25
Simple tip:
Instead of CFrame.new(), define a variable on the top of your RenderStep RBXScriptConnection (outside of it) like this
Do the same thing for Vector3 to optimize as much as possible your code since this is a very quick loop. Also, I would move line 8 outside of the scope (on top of it) because from what I know defining a camera’s type is not necessary in a loop
1
u/NotNominoDev Sep 14 '25
Are you serious rn 😭
1
u/Hefty-Flounder-1899 Sep 14 '25
Whats up with :Lerp? Why u use it
1
u/Willing_Comb6769 Sep 16 '25 edited Sep 16 '25
you can press enter after opening a parentheses to write the arguments in multiple lines. for better readability.
which can help avoid mistakes like this
-5
u/FigglebottomCat Sep 14 '25
chatgpt is free
-7
u/Difficult_Tear_4987 Sep 14 '25
I always use vs code because it has the GitHub copilot feature and chat feature that just makes finding mistakes much easier or you can just copy the block and paste it into Microsoft’s copilot or ChatGPT or something similar and it will tell you the mistakes