I made this script for a testing "Meeting" game but when i tested it wont get to change, these are my scripts:
Textbutton local script to start remote:
local WarnEVENT = game.ReplicatedStorage.Events.Warn
script.Parent.MouseButton1Click:Connect(function()
local String = script.Parent.Parent.TextString.Text
local String2 = "The hoster sayed: "
local Write = string.format(String2, String)
WarnEVENT:FireServer(Write, "ChangeWarn")
print("Host Try to change Warn!")
end)
Serverscriptservice script to fireAllclients:
local WarnEVENT = game.ReplicatedStorage.Events.Warn
WarnEVENT.OnServerEvent:Connect(function(Write, Request)
if Request == "ChangeWarn" then
WarnEVENT:FireAllClients(Write)
print("Changing for All players")
else
return
end
end)
localscript inside the text to put warn:
local WarnEVENT = game.ReplicatedStorage.Events.Warn
WarnEVENT.OnClientEvent:Connect(function(Write)
script.Parent.Text = Write
end)
If someone know's why not working please help!
