Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-1

How do I make my tool always equipped and can cycle through my tools by pressing Q? [closed]

Asked by 4 years ago
Edited 4 years ago

Usually you have to press a number on your keyboard to equip a tool but I want it so that I always have a tool I my hand just like in arsenal. I also want to be able to cycle through the tools by pressing Q. How might I do this?

0
And you also might want to use for loops combined with tables to avoid having more elseif's than the chinese population User#32819 0 — 4y

Closed as Not Constructive by BestCreativeBoy and Gey4Jesus69

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?

1 answer

Log in to vote
1
Answered by 4 years ago

ScriptingHelpers isn't a request site, but I can point you in the right direction with some things you can review.


'I want it so that I always have a tool I my hand just like in arsenal'


Welding could be used in this case to make the tool's parts effectively 'stick' to the player's arms, so you could make it look like the tool is constantly in your hand


' I also want to be able to cycle through the tools by pressing Q. '


UserInputService is useful here, as it can detect when a player presses something on their keyboard. For a more mobile-friendly approach, you could use Context Action Service to create a mobile button if the user is on mobile.

0
ill give it a try WheatMealLoaf -2 — 4y
0
Ok! JeffTheEpicRobloxian 258 — 4y
0
wait, I don't actually think that welding it is a good idea because then i think I'd have to redo my entire gun script WheatMealLoaf -2 — 4y
0
Maybe try and do the userinputservice part first, making it so when you press q is switches to a new tool before the welding idea JeffTheEpicRobloxian 258 — 4y
View all comments (2 more)
0
Ok WheatMealLoaf -2 — 4y
0
hope this helped JeffTheEpicRobloxian 258 — 4y
Ad