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

Why does the text only show for my client?

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!

1 comment

0

use playergui if u want it to work

1 answer

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)

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