Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Transparency changer not working (for decals)?

Asked by 2 years ago

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)

this is screenshot of decals

0
this is link to screenshot http://imgur.com/AVcXWZs Bartosz_olsztyn 16 — 2y
0
delete the string.lower(msg) totosimamora608 61 — 2y
0
ok Bartosz_olsztyn 16 — 2y
0
thanks Bartosz_olsztyn 16 — 2y

Answer this question