1/2/2024 0 Comments Fly script roblox![]() ![]() Local bp = Instance.new("BodyPosition", myHRP) - Body Position that determines your location Local myHRP = m圜har:WaitForChild("HumanoidRootPart") I’ll lay them all out here: local myPlayer = This is going to be the bulk of your code, and I’ll write a fairly quick example of how you could write the flying “physics”.įirst things first, you need a few variables set up. We’ll call this function “Fly” function fly() Next up, you’ll need a function for flying that is called whenever your user presses the space bar. Again, this isn’t really all too difficult. You then need to make it so that it detects when the user has pressed the key desired. This gets all the things the UIS can do for us. Easy! local uis = game:GetService("UserInputService") I don’t know quite how new you are to scripting, so I’ll assume you understand code but don’t know the specifics.įirst things first, you need to get the UserInputService. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |