My code is this, for the client:
game.ReplicatedStorage.Classes.Say.OnClientEvent:Connect(function(msg, from, inclass) -- I hope this works... - Toby
for i = 1, #inclass do
if i == game.Players.LocalPlayer.Name then
local gui = game.ReplicatedStorage.InClass:Clone()
gui.Frame.Message.Text = msg
gui.Frame.From.Text = from
gui.Parent = game.Players.LocalPlayer.PlayerGui
wait(3)
gui:Destroy()
end
end
end)
And to fire, from the server, we do this:
local playerTable = {player.Name}
game.ReplicatedStorage.Classes.Say:FireAllClients("Secret society doesn't work!", "Server Message!", playerTable)
print(player.Name)
print("This place hasn't been made!")
The prints, on the server script, fires. But the Gui doesn't pop up, and worse of all, there are no errors...
Thanks for reading this, I really hope that you can help me. - Toby

1 comment
For client, Change "if i == game.Player.LocalPlayer.Name then" to "if inclass[i] == game.Players.LocalPlayer.Name then"