So as soon as I brought Emergency response Liberty county I realised there was a mini radio if I pressed “y” and if I press a button it will automatically say something into the radio. Now I started developing a game similar to ERLC and I want to add that feature in. I’m working with my friend he is alantano he’s better at scripting then me but he and I can’t figure out how to script the quick radio. I’ve looked on various amounts of information but still I can’t find the solution. So @Shawnyg and @mrfergie please help me.
This is my very first post so if I do anything wrong I’m sorry.
Ok then you will need to use the chat modules but to make it think that you sent the message from that client. Also you will need to use user input service to make the radio tween in.
Alternatively make a custom chat and make it so you can send messages which look like they have come from the player but they actually came from the quick radio.
I get your point here but thats not what I am after. I want a mini radio pop out after I press a key. Then you select the option, automactically the option that you selected makes a bit more sense and it sends it through to the radio.
Yes so to make the radio pop out you need to use user input service and to make it output stuff into the chat you either need to make a custom chat or use the chat modules to work for you.
Thanks for the information me and my scripter will book a devloping session to script this using your info. In return you will get credited in our’s game description.
The first method of “check what invisible part the player is touching” seems highly inefficient as you’d have to have big invisible parts all over the map. We approached this by having invisible parts scattered around the map representing each location, and we just check which part the player is closest to, then display that name. You’ll need to use Magnitude to accomplish this: (Part.Position - Player.Position).Magnitude .
As far as handling the “Y” input for the radio, you’ll need to look into UserInputService’s InputBegan to see when a user presses Y. To make the radio slide up, you can use :TweenPosition(). Anything other than that would be scripting the buttons which you can find some guide for. Hope I helped!