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

why will it only detect scar but not Scar?

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)

1 comment

0

if (msg == "scar") or (msg == "Scar") then ..

1 answer

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)

1 comment

0

You forgot the quotation mark on the 4th line, before scar

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