Alright, I will explain this briefly. Basically, I experiment generally with scripts, yet, I never really got around to figuring this out. I've been trying for the past couple of days trying to fix it. Anyway, I'll show you the script now, and I'll explain what its purpose is.
wait (0.5) msg1 = script.Parent msg1.Touched:connect(function(hit) game:GetService("StarterGui"):SetCore("ChatMakeSystemMessage",{ Text = "text test"; Color = Color3.new(255/255, 215/0, 0/0); FontSize = Enum.FontSize.Size24; }) wait(2) game:GetService("StarterGui"):SetCore("ChatMakeSystemMessage",{ Text = "text test2"; Color = Color3.new(255, 255, 255); FontSize = Enum.FontSize.Size24; }) wait(2) game:GetService("StarterGui"):SetCore("ChatMakeSystemMessage",{ Text = "text test 3"; Color = Color3.new(255, 255, 255); FontSize = Enum.FontSize.Size24; }) end)
Basically, what it is supposed to do, is when you step on a brick (I named this brick msg1) makes it so when you touch something with your body part, it will initiate a piece of code in the ROBLOX integrated chat.
I may as well also add that FilteringEnabled is off, just in case. I appreciate any help :)
Hello,
Script, Inside of part...
msg1 = script.Parent msg1.Touched:connect(function(hit) local client = game.Players:GetPlayerFromCharacter(hit.Parent) local remote = script.Remote if client then remote:FireClient(client,"TEXT1",Color3.new(1,0,0),Enum.FontSize.Size24) wait(2) remote:FireClient(client,"TEXT2",Color3.new(1,1,1),Enum.FontSize.Size32) wait(2) remote:FireClient(client,"TEXT3",Color3.new(0,0,0),Enum.FontSize.Size18) end end)
Note : if you want to change text for all players , it must be like this...
remote:FireAllClients("TEXT3",Color3.new(0,0,0),Enum.FontSize.Size18)
Localscript, inside of StarterPack...
local remote = workspace.Part1.Script.Remote function SetCoreMessage(tex,c,size) local set = game:GetService("StarterGui") set:SetCore("ChatMakeSystemMessage",{ Text = tex, Color = c, FontSize = size }) --print("SUCCESS") end remote.OnClientEvent:Connect(function(t,cl,s) SetCoreMessage(t,cl,s) end)
-workspace --Part1 ---Script ----Remote
Thank you for reading! Wish you goodluck!