okay so i'm really bad at scripting and i would like some help with this. I need help making a script that makes it so when i say a certain word it adds a Decal to the head on the player.
Here's what i got:
local player = game.Players.LocalPlayer
local char = player.Character
local marks = game.Lighting.mark:Clone()
player.Chatted:Connect(function(Msg)
local msg = Msg:lower()
if string.sub(msg, 1, 5) == "demon" then
wait(0.1)
marks.Parent = char.Head
end
if string.sub(msg, 1, 3) == "off" then
wait(0.1)
marks:Destroy()
end
end)
function OnDeath()
wait()
marks:Destroy()
end
player.Chatter:Connect(onChatted)
really bad but its only what i got

3 comments
so how exactly does string.sub(msg, 1, 7) == "Demon"
i asked for help
yes and i fixed it i chaned it to msg, 1, 5 but still aint working