this is a local script

local player = game.Players.LocalPlayer
    player.Chatted:Connect(function(msg)
    
    if msg:lower():match("gravity") then
    
    local value = msg:sub(8)
    
    print(value)
    
    game.ReplicatedStorage:WaitForChild("gravity"):FireServer(value)
    
    end
    
    if msg:lower():match("kill") then
    
    if game.Players:FindFirstChild(msg:sub(6)) then
    
    local target = game.Players:FindFirstChild(msg:sub(6))
    
    print(target)
    
    game.ReplicatedStorage:WaitForChild("kill"):FireServer(target)
    
    end
    
    end
    
    end)

no prints and no errors, when i run this from a script inside a folder it works perfectly, WHY