Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Change text in a textbox with filtering enabled?

I'm just strugging to make a radio with Filtering Enabled It's a server script.

local PonerMusica = game.Workspace.PonerMusicaGlobal
local PararMusica = game.Workspace.PararMusicaGlobal
local EventoFiltering = game.Workspace.CambiarTexto
Debug = 0

local function PonerMusicaGlobal(p)
    if Debug == 0 then
	    Debug = 1
		Audio = Instance.new("Sound")
		Audio.Name = "Audio"
		Audio.Parent = game.Workspace
		local ID = script.Parent.Text
    	Audio.Looped = true
    	Audio.SoundId = "rbxassetid://"..ID
    	Audio:Play()
	end
end

local function PararMusicaGlobal(p)
    if Debug == 1 then
	    Debug = 0
 		Audio.Looped = false
    	Audio:Stop()
	end
end
 

PararMusica.OnServerEvent:Connect(PararMusicaGlobal)
PonerMusica.OnServerEvent:Connect(PonerMusicaGlobal)

2 comments

0

Is this a server script and is there something in a local script that triggers the server event?

0

It is a server script.

1 answer

You need to make a RemoteEvent inside the player with a local script that changes the text in the textbox. The RemoteEvent needs to be triggered by your ServerScript.

3 comments

0

I don't understand... I just want to detect the text input a player has in his screengui.

0

FilteringEnabled requires you to send Remote Events/Functions to allow for the server to change things. The server cannot edit the player GUIs without a Remote Event (unless the GUIwas made by the server previously).

0

So I can just make a GUI with a script then I can access the text of the textbox input of the client?

This discussion is preserved as it was. New answers, comments, and votes are closed.