Hello i have a question why my scripts not working ( all scripts in workspace )
there are scripts
1st
function onChatted(msg, speaker) local source = string.lower(speaker.Name) msg = string.lower(msg) if msg == "-Alert5" then script.Parent.Part.Alert1.Transparency = 1; script.Parent.Part.Alert2.Transparency = 1; script.Parent.Part.Alert3.Transparency = 1; script.Parent.Part.Alert4.Transparency = 1; script.Parent.Part.Alert5.Transparency = 0; end end game.Players.PlayerAdded:connect(function(player) player.Chatted:connect(function(msg) onChatted(msg, player) end) end)
2nd
function onChatted(msg, speaker) local source = string.lower(speaker.Name) msg = string.lower(msg) if msg == "-Alert4" then script.Parent.Part.Alert1.Transparency = 1; script.Parent.Part.Alert2.Transparency = 1; script.Parent.Part.Alert3.Transparency = 1; script.Parent.Part.Alert4.Transparency = 0; script.Parent.Part.Alert5.Transparency = 1; end end game.Players.PlayerAdded:connect(function(player) player.Chatted:connect(function(msg) onChatted(msg, player) end) end)
3rd
function onChatted(msg, speaker) local source = string.lower(speaker.Name) msg = string.lower(msg) if msg == "-Alert3" then script.Parent.Part.Alert1.Transparency = 1; script.Parent.Part.Alert2.Transparency = 1; script.Parent.Part.Alert3.Transparency = 0; script.Parent.Part.Alert4.Transparency = 1; script.Parent.Part.Alert5.Transparency = 1; end end game.Players.PlayerAdded:connect(function(player) player.Chatted:connect(function(msg) onChatted(msg, player) end) end)
4th
function onChatted(msg, speaker) local source = string.lower(speaker.Name) msg = string.lower(msg) if msg == "-Alert2" then script.Parent.Part.Alert1.Transparency = 1; script.Parent.Part.Alert2.Transparency = 0; script.Parent.Part.Alert3.Transparency = 1; script.Parent.Part.Alert4.Transparency = 1; script.Parent.Part.Alert5.Transparency = 1; end end game.Players.PlayerAdded:connect(function(player) player.Chatted:connect(function(msg) onChatted(msg, player) end) end)
5th
function onChatted(msg, speaker) local source = string.lower(speaker.Name) msg = string.lower(msg) if msg == "-Alert1" then script.Parent.Part.Alert1.Transparency = 0; script.Parent.Part.Alert2.Transparency = 1; script.Parent.Part.Alert3.Transparency = 1; script.Parent.Part.Alert4.Transparency = 1; script.Parent.Part.Alert5.Transparency = 1; end end game.Players.PlayerAdded:connect(function(player) player.Chatted:connect(function(msg) onChatted(msg, player) end) end)