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

why will it only detect scar but not Scar? [closed]

Asked by
Plieax 66
6 years ago
local plr = game.Players.LocalPlayer

plr.Chatted:connect(function(msg)
    if msg == ("scar" or "Scar") then
        local scar = workspace.Scar 
        scar.CanCollide = false
        scar.Transparency = .7
        scar.Decal1.Transparency = .7
        scar.Decal2.Transparency = .7
        wait(1.5)
        scar.Transparency = 0
        scar.Decal1.Transparency = 0
        scar.Decal2.Transparency = 0
        scar.CanCollide = true
    end


end)
0
if (msg == "scar") or (msg == "Scar") then .. hellmatic 1523 — 6y

Closed as Non-Descriptive by hellmatic, brokenVectors, Async_io, and Avigant

This question has been closed because its title or content does not adequately describe the problem you are trying to solve.
Please ensure that your question pertains to your actual problem, rather than your attempted solution. That is, you were trying to solve problem X, and you thought solution Y would work, but instead of asking about X when you ran into trouble, you asked about Y.

Why was this question closed?

1 answer

Log in to vote
1
Answered by
Plieax 66
6 years ago
Edited 6 years ago
local plr = game.Players.LocalPlayer

plr.Chatted:connect(function(msg)
    if msg == "scar" or  msg == "Scar" then
        local scar = workspace.Scar 
        scar.CanCollide = false
        scar.Transparency = .7
        scar.Decal1.Transparency = .7
        scar.Decal2.Transparency = .7
        wait(1.5)
        scar.Transparency = 0
        scar.Decal1.Transparency = 0
        scar.Decal2.Transparency = 0
        scar.CanCollide = true
    end


end)
0
You forgot the quotation mark on the 4th line, before scar brokenVectors 525 — 6y
Ad