Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

Why does the text only show for my client?

Asked by 4 years ago

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!

0
use playergui if u want it to work raid6n 2196 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago
Edited 4 years ago

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)
Ad

Answer this question