|
| 26 Aug 2016 08:27 PM |
So I want to make a Keybind(Keydown) script, if a player presses "v" the AI(Dummy) would move 10 studs forward. How I go about making this and where would I put the localscript, int he dummy? Thank you for your help!
#HelpMe |
|
|
| Report Abuse |
|
|
|
| 26 Aug 2016 08:31 PM |
How would I go about making this?**
#HelpMe |
|
|
| Report Abuse |
|
|
|
| 26 Aug 2016 08:33 PM |
| http://wiki.roblox.com/index.php?title=API:Class/UserInputService |
|
|
| Report Abuse |
|
|
|
| 26 Aug 2016 08:44 PM |
| I understand, I've already looked at that. My question is how would I type it, since the wiki won't show an example.... |
|
|
| Report Abuse |
|
|
|
| 26 Aug 2016 08:46 PM |
no uis is trash 2 me k
wait(1) player = game.Players.LocalPlayer mouse.KeyDown:connect(function() if key == "v" then workspace.Dummy.Humanoid:MoveTo(workspace.Dummy.Torso * Vector3.new(0,0,10)) end end) |
|
|
| Report Abuse |
|
|
|
| 27 Aug 2016 08:58 AM |
Does not work, I've typed all that in a Localscript and put it into Workspace.
#LetsMakeItWork |
|
|
| Report Abuse |
|
|
|
| 27 Aug 2016 09:04 AM |
^ thats cuz keydown is even bigger trash youtube wiki google |
|
|
| Report Abuse |
|
|
|
| 27 Aug 2016 09:05 AM |
| and because if you seriously just put a LOCAL script and attempted to run it in the workspace then you need to study roblox a looooooooot more |
|
|
| Report Abuse |
|
|
|
| 27 Aug 2016 09:10 AM |
So then tell me, how would I do this. Make the AI(Dummy) move 10 studs forward?
|
|
|
| Report Abuse |
|
|
|
| 27 Aug 2016 09:11 AM |
When I press a key (for example "v")
|
|
|
| Report Abuse |
|
|
|
| 27 Aug 2016 09:11 AM |
local script inside any child of the Player (including character) and putting it in StarterWhatever already tosses it into them anyways
|
|
|
| Report Abuse |
|
|
|
| 27 Aug 2016 09:12 AM |
| like i said, look at where you can use local scripts and tutorials on user input service |
|
|
| Report Abuse |
|
|
pullman45
|
  |
| Joined: 09 Jul 2012 |
| Total Posts: 2891 |
|
|
| 27 Aug 2016 10:53 AM |
https://youtu.be/C0qQ4lDa3t0
I hope that's the right link (it's a UserInputService tutorial). |
|
|
| Report Abuse |
|
|