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

Why is my script not working?

This is sort of like an admin command but it isnt admin, it is a calculator type thing.

Script Below

game.Players.PlayerAdded:connect(function()
	for i,v in pairs(game.Players:GetChildren()) do
		v.Chatted:connect(function(msg)
		if msg:lower():sub(1,5) == "math " then
			m = Instance.new("Message")
		elseif v.Chatted == "math 0 + 1 = "
			then m.Parent = game.Workspace
			m.Text = ("1")
			
end
end)
end
end)

1 answer

On line 3, you have:

v.Chatted:connect()

What is the connect function connecting? I think you're looking for:

v.Chatted:connect(function(msg)

2 comments

0

Thanks, Ill try it out.

0

Still didnt work, A message didnt appear saying 1, But I did add your line of code to the script.

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