Recently just finished watching dev king’s basic scripting tutorial and a bit of his advanced tutorial. Before I watch the rest of the tutorials I wanted to test my programming skills and try to quickly program some small script that does something. Though I have no idea what to script that can be simply scripted with basic scripts. Any ideas?
What was the video you watched about?
I know if statements, functions, variables, parent/child stuff, mainly beginner stuff. Oh and key/mouse input.
Hmm, maybe you can write a script that will print certain characters depending on the key pressed using functions. Meaning that you’d define functions prior to detecting input, and then call those functions once a certain key is pressed, if that makes sense.
Oh ya I know what you mean. Ya I can do that. Though I was mainly wanting to make like something physically happen on the screen like a player interacting with something.
Oh you can do that if you’d like, the only reason I didn’t suggest that was because I wasn’t sure if you knew about CFrames (very important) and tweening. To move the character you shouldn’t use position but rather CFrames because it’ll cause less problems and it’s good practice.
How about a part that when your player touches it it opens a door (you can just disable collisions and set transparency to 1) for 5 seconds then after the 5 seconds the door closes.
I started learning about Cframes Its just confusing for me. Any tips on how I can practice or better understand Cframes?
This is a great example
Uh wrong one
Here’s the real thing:
I’ll try to explain.
CFrames are essentially a more ‘reliable’ version of .Position, but its more powerful in the way that you can do relative positioning way easier. For example, the basic constructer “CFrame.new(vector3pos , vector3lookat)” sets a position and a look-at position. I’m bad at explaining and this took too long to write, but here’s a pretty good explanation of CFrames and how to use them. In a few minutes I’ll reply with some other useful info that I wish I knew.
Edit: It says “Advanced Scripting” but I’m sure you can understand it with your current knowledge.
Learning CFrames is best done in projects. There are too many uses for them and you usually want it to do your thing. Those links will help especially the dev API reference and CFrame math article which I used for the following projects. However it’s best to look at them with a goal in mind.
My first project with CFrame, making a turret I had to get scripting support help for it initially thanks Moonvane.
My best current solution as a community resource check out the code if you are interested.
My second project is making a part orient to the floor using raycasting to make a unicycle in my attempt to create a weird vehicle.
Another more common project which requries CFrame is to use it for a building system like a furniture placement system.
I recommend doing a project you are most interested with and looking at that AlvinBlox tutorial which I looked at initially to get an overview of what it could do CFrame.lookAt is very important.
Make a tool that whenever you click, the mouse position where you click will have an explosion.
Oooo EPIC mech dude! I’ll try making a little project using Cframes later on when I understand them a bit better.