I made a message option where u can send a message to every client, the script is making it visible for allclients but, the script is taking the text from the clients textlabel and placing it in the textlabel. the problem is that i want the script to give my text out to the client how to do that here's my script
local ReplicatedStorage = game:GetService("ReplicatedStorage") local TextService = game:GetService("TextService") local Event = ReplicatedStorage.JatzaEvent Event.OnClientEvent:Connect(function() script.Parent.Parent.Jatza.OptionFrames.MessageFrame.Visible = false script.Parent.Visible = true script.Parent.MessageText.Text = script.Parent.Parent.Jatza.OptionFrames.MessageFrame.Selection.SearchFrame.SearchBox.Text script.Parent.Parent.Jatza.OptionFrames.MessageFrame.Selection.SearchFrame.SearchBox.Text = "" end)
Would make my day if some god could help me!
I see something, I think changing ''OnClientEvent'' to ''OnServerEvent'' works or add ''OnServerEvent'' into new space but if it doesn't work then I don't know...
local ReplicatedStorage = game:GetService("ReplicatedStorage") local TextService = game:GetService("TextService") local Event = ReplicatedStorage.JatzaEvent Event.OnClientEvent:Connect(function() Event.OnServerEvent:Connect(function() script.Parent.Parent.Jatza.OptionFrames.MessageFrame.Visible = false script.Parent.Visible = true script.Parent.MessageText.Text = script.Parent.Parent.Jatza.OptionFrames.MessageFrame.Selection.SearchFrame.SearchBox.Text script.Parent.Parent.Jatza.OptionFrames.MessageFrame.Selection.SearchFrame.SearchBox.Text = "" end)