You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve?
I want to make a server message script and I don’t get familiar w chat server message.I want it when you chat “!ServerMessage [text]” It will show text for all player’s gui. -
What is the issue? The script doesn’t work.I tried to chat the command with a text after the command but it doesn’t show up gui or anything
-
What solutions have you tried so far? Yes I did but it just show server message in chat only.Not gui.
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
SERVER SIDED:
game.Players.PlayerAdded:Connect(function(player)
player.Chatted:Connect(function(message)
if message:sub(1, 14) == "!ServerMessage" then
local text = message:sub(16)
game.ReplicatedStorage.ServerMessage:FireAllClients(text)
end
end)
end)
GUI CILENT SIDED
game.ReplicatedStorage.ServerMessage.OnClientEvent:Connect(function(text)
script.Parent.TextLabel.Text=text
game:GetService("TweenService"):Create(script.Parent.ServerMessagePlace,TweenInfo.new(1,Enum.EasingStyle.Sine),{TextTransparency=0}):Play()
game:GetService("TweenService"):Create(script.Parent.TextLabel,TweenInfo.new(1,Enum.EasingStyle.Sine),{TextTransparency=0}):Play()
game:GetService("TweenService"):Create(script.Parent,TweenInfo.new(1.8,Enum.EasingStyle.Sine),{Transparency=0.8}):Play()
task.wait(6.5)
game:GetService("TweenService"):Create(script.Parent.ServerMessagePlace,TweenInfo.new(1,Enum.EasingStyle.Sine),{TextTransparency=1}):Play()
game:GetService("TweenService"):Create(script.Parent.TextLabel,TweenInfo.new(1,Enum.EasingStyle.Sine),{TextTransparency=1}):Play()
game:GetService("TweenService"):Create(script.Parent,TweenInfo.new(1.8,Enum.EasingStyle.Sine),{Transparency=1}):Play()
end)