Need help scripting a radio ui

That is one script it is the local script for the radio gui im using

pretty sure you gotta modify your chat for that, for me it never worked with the base roblox chat, and I modified the chat for it to show up.

I seen it out there as a matter of fact its on tennessee rp. Even if i can figure out how to have it just send to the radio and work in the radio ui in general that way would be fine to ill post radio script again the correct way so its easy to understand

How did you go about doing that i have looked for hours trying to figure this out im nit to familiar with the chat and how it works never really ventured into doing that.

@iiNathxnism ive tried to upload it from my scripts from my phone and its not working so hot for me and wont be around my comouter until tomorrow… my question is i was reading your very detailed post but my question and how would i put all that together in a script like i said im new to this and trying to figure it out but im having issues lol idk if you give me a example on what it would look like as a script so i can go from there and put info where i need to just to understand how this goes together im a visual learner trying to comprehend and put it all together blows my mind lol

Also maybe the chat service idea is out of the option for this my next question if i made this its own ui and they just press the buttons it would fire it to the radio how would i link the two guis together? Isnthat possible like i said pretty new to this i got modeling and things down but there is no easy way around learning this scripting part… @iiNathxnism

pardon for the late reply, time zone difference, was sleeping xD but here’s a thing.

I’ve worked previously with these kind of situations, and there is only one thing I’d give out to you:
You’d need to have 3 things: LocalScript, RemoteEvent and ServerScript.

Your StarterGUI should look like this.
image

And then you’d want to have a RemoteEvent in ReplicatedStorage
image

This is how it will work:
If you press the Button in the StarterGUI, The Local Script will then Pass the Message to the ServerScript (Script) that will then listen and copy and paste the information you passed.

Client (Local Player) > RemoteEvent (Passing Values) > Server (Receiver)

Take a look at this example (The Green Line is the Starting Point):
image


Now the situation may depend. Some Server Scripts are inside ServerScriptStorage. But as for this situation, you need it to send for everyone else.


Now as for the Contents inside the script, what services you’d need is as follows:
LOCAL SCRIPT (CLIENT)

local ReplicatedStorage	= game:GetService("ReplicatedStorage") 	-- // Used to detect the RemoteEvent
local UserInputService 		= game:GetService("UserInputService") 	-- // Used to detect which Key a Player Presses on the Keyboard 

local Button 						= nil -- // Where the button is Pressed, you can Replace "nil"

-- // Now your script starts here
-- // UserInputService is used for Detecting Controller Keys
-- // If in PC, you don't need UIS, since you can just Click the Button with Mouse

local Message					= nil -- // Replace nil with where the Text's info is that you will Send

-- // For example:
-- // For Controller
local Debounce				= false -- // You'd add a Debounce so it won't get spammed

UserInputService.InputBegan:Connect(function(Input)
	if Debounce == false then
		if Input.KeyCode == Enum.KeyCode.ButtonX then -- // Your Gamepad/Controlller's Key here
			ReplicatedStorage:WaitForChild("ExampleRemoteEvent"):FireServer(Message)
			Debounce = true
			
			-- // Additional Script here
		end
	end
end)

UserInputService.InputEnded:Connect(function(Input)
	if Debounce == true then
		wait() -- // You can add any value here to wait how many seconds can they re-send it again 
		Debounce = false -- // After the Action has ended, you can now Re-send the signal again
	end
end)

-- // If your player is in PC, you can just do this:
Button.MouseButton1Click:Connect(function()
	if Debounce == false then
		ReplicatedStorage:WaitForChild("ExampleRemoteEvent"):FireServer(Message)
		
		Debounce = false
	elseif Debounce == true then
		wait()
		Debounce = true
	end
end)

For the Server Script:
You’d just need to have ReplicatedStorage and you’d use the code

ReplicatedStorage:WaitForChild("ExampleRemoteEvent").OnClientEvent:Connect(function(Message)
	-- // Code here
end)

You can also use this Documents

1 Like

Thank you for the reply that puts it all into context for me to understand i have things in places they shouldnt. Where you have a script i have a local script and where you have a local script i have a script i did it all wrong lol ill set it up later tonight we are definitely on a timezone difference ( northern wisconsin usa). If I have any questions ill get back to you on here and if not ill mark that as the solution and thank you for all of your help

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.