Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How Would i make a block put a msg in chat?

so this what iv started with im making a robbery type game and i want to make it annouce that somewhere is being robbed

script.Parent.Touched:Connect(function()
	local sm = BrickColor.new ("New Yeller")
	game.StarterGui:SetCore("ChatMakeSystemMessage", {
		Text = "This worked!";
		Font = Enum.Font.ArialBold;
		Colour = sm.Color;
		FontSize = Enum.FontSize.Size96;})
end)

1 comment

0

When you write a question, start with stating the issue, because its a little confusing if you dont.

1 answer

first of all, idk if this works but change the script to a local script and put it inside of starter gui

local part = workspace. --your path here

game.Players.PlayerAdded:Connect(function(player)
	part.Touched:Connect(function(hit)
		player:GetPlayerFromCharacter(hit.Parent)
		if hit.Parent then
			local sm = BrickColor.new("New Yeller")
			repeat
				wait()
				local success = pcall(function()
					script.Parent:SetCore("MakeChatSystemMessage", {
						Text = "This worked!";
					        Font = Enum.Font.ArialBold;
					        Colour = sm.Color;
					        FontSize = Enum.FontSize.Size96;
					})
				end)
			until success
		end
	end)
end)

2 comments

0

yea but i want it to show up on everyones chat

0

-- also doesnt work doesnt come up with any errors

This discussion is preserved as it was. New answers, comments, and votes are closed.